# Elastic APM intake/v2/rum/events requests cancelled

**URL:** <https://discuss.elastic.co/t/elastic-apm-intake-v2-rum-events-requests-cancelled/315137>\
**Category:** APM\
**Tags:** rum\
**Created:** [September 26, 2022, 7:22am UTC](https://discuss.elastic.co/t/elastic-apm-intake-v2-rum-events-requests-cancelled/315137 "2022-09-26T07:22:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bluestar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bluestar/32/109054_2.png) [@bluestar](https://discuss.elastic.co/u/bluestar)\
**Post date:** [September 26, 2022, 7:22am UTC](https://discuss.elastic.co/t/elastic-apm-intake-v2-rum-events-requests-cancelled/315137/1 "2022-09-26T07:22:59Z")

</div>

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)**:

 ![Screenshot 2022-09-26 at 12.36.35 PM](https://us1.discourse-cdn.com/elastic/original/3X/3/9/397f478d568954bf343c88807949739c4baa7b0f.jpeg)

**Steps to reproduce** :

1. Load the angular application and check network

**Errors in browser console (if relevant)**:

[Elastic APM] Failed sending events! DOMException: The user aborted a request.

---

<div class="post-metadata">

**Author:** ![vigneshshanmugam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vigneshshanmugam/32/40324_2.png) [@vigneshshanmugam](https://discuss.elastic.co/u/vigneshshanmugam)\
**Post date:** [September 26, 2022, 4:04pm UTC](https://discuss.elastic.co/t/elastic-apm-intake-v2-rum-events-requests-cancelled/315137/2 "2022-09-26T16:04:14Z")

</div>

Hi @bluestar ,

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.

Thanks,  
Vignesh

---

<div class="post-metadata">

**Author:** ![bluestar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bluestar/32/109054_2.png) [@bluestar](https://discuss.elastic.co/u/bluestar)\
**Post date:** [September 27, 2022, 5:58am UTC](https://discuss.elastic.co/t/elastic-apm-intake-v2-rum-events-requests-cancelled/315137/3 "2022-09-27T05:58:26Z")

</div>

Hi @vigneshshanmugam ,

APM server is reachable (see 202s), as stated before I can also see the data in the dashboard.

Please find details below -

**Request**

Request URL: https://\*\*\*.com/intake/v2/rum/events

Request Method: POST

Status Code: 202

Remote Address: _ **.** _._ **.** _

Referrer Policy: strict-origin-when-cross-origin

**Response Headers**

access-control-allow-origin: https://\*\*\*.com  
content-length: 0  
date: Tue, 27 Sep 2022 05:33:41 GMT  
x-content-type-options: nosniff

---

<div class="post-metadata">

**Author:** ![Alberto\_Delgado](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alberto_delgado/32/98488_2.png) [@Alberto\_Delgado](https://discuss.elastic.co/u/Alberto_Delgado)\
**Post date:** [September 27, 2022, 3:46pm UTC](https://discuss.elastic.co/t/elastic-apm-intake-v2-rum-events-requests-cancelled/315137/4 "2022-09-27T15:46:38Z")

</div>

Hi @bluestar,

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

Thanks,  
Alberto

---

<div class="post-metadata">

**Author:** ![bluestar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bluestar/32/109054_2.png) [@bluestar](https://discuss.elastic.co/u/bluestar)\
**Post date:** [September 29, 2022, 11:53am UTC](https://discuss.elastic.co/t/elastic-apm-intake-v2-rum-events-requests-cancelled/315137/5 "2022-09-29T11:53:44Z")

</div>

H @Alberto_Delgado,

We are using version 8.4.1 for both.

---

<div class="post-metadata">

**Author:** ![Alberto\_Delgado](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alberto_delgado/32/98488_2.png) [@Alberto\_Delgado](https://discuss.elastic.co/u/Alberto_Delgado)\
**Post date:** [September 29, 2022, 4:23pm UTC](https://discuss.elastic.co/t/elastic-apm-intake-v2-rum-events-requests-cancelled/315137/6 "2022-09-29T16:23:03Z")

</div>

Hi @bluestar,

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](https://www.elastic.co/guide/en/apm/guide/current/monitor-apm.html) enabled to see if the issues happen when higher amount of events are [processed](https://www.elastic.co/guide/en/apm/guide/current/processing-and-performance.html)?

Thanks,  
Alberto

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 20, 2022, 12:23pm UTC](https://discuss.elastic.co/t/elastic-apm-intake-v2-rum-events-requests-cancelled/315137/7 "2022-10-20T12:23:42Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
