I have elastic apm setup for an angular 13 application (using npm package @elastic/apm-rum). I can see https://***.com/intake/v2/rum/events request going responding 202 and being cancelled after 10 secs.
In chrome console, I can see below warning -
[Elastic APM] Failed sending events! DOMException: The user aborted a request.
However, I can see data in the dashboard.
Why the requests are cancelled and how to solve this?
Kibana version:
Elasticsearch version:
APM Server version:
APM Agent language and version:
Browser version: Chrome 105.0.5195.125
Original install method (e.g. download page, yum, deb, from source, etc.) and version:
Fresh install or upgraded from other version? - Fresh Install
Is there anything special in your setup? - None
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
Thanks for raising this, The RUM agent has a default timeout of 10 seconds for sending the collected data to the APM server and past that, the browser cancels the request as we are past that configured timeout value.
Could you check if the APM server is reachable for those failed requests and if you can provide more debug information like the response headers and data if available.
Checking the screenshot I can see that sometimes the request is being sent properly and sometimes is not.
As @vigneshshanmugam said on a previous comment, the RUM agents times out a request after 10 seconds if the APM server does not respond.
Because of that I have the following questions:
What version of the Elastic Stack are you using?
What version of the APM server and RUM agent are you using?
When it comes to the APM version: there were a lot of improvements related to memory handling during the 7.x cycles, because of that, I highly recommend you to upgrade to at least 7.16 if possible
It might be worth checking the size and CPU usage of the APM Server, and/or ES setup. Long response times indicate that the server cannot ingest events fast enough.
Do you have Stack Monitoring enabled to see if the issues happen when higher amount of events are processed?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.