ERR_CONNECTION_TIMED_OUT in django template

APM Agent language and version: python, 5.7

Browser version: 102

Original install method (e.g. download page, yum, deb, from source, etc.) and version: deb

Steps to reproduce:
I am trying to track API requests and page load time on Django admin using rum, but having a very hard time setting it up.. we have a self-hosted APM server and the admin is in another instance... I have injected the code in the Django template but for some reason, requests are being timeout, and idk what can be done here to resolve this...

        <script>
          ;(function(d, s, c) {
            var j = d.createElement(s),
              t = d.getElementsByTagName(s)[0]

            j.src = 'https://cdn.jsdelivr.net/npm/@elastic/apm-rum@5.2.0/dist/bundles/elastic-apm-rum.umd.min.js'
            j.onload = function() {
                elasticApm.init(c)
            }
            t.parentNode.insertBefore(j, t)
          })(document, 'script', {
                serviceName: "admin",
                serverUrl: "{% elastic_apm_server_url %}"
            })
        </script>

Errors in browser console (if relevant):

[Elastic APM] Failed sending events! Error: https://<private_url>:<port>/intake/v2/rum/events HTTP status: 0
    at e._constructError (apm-server.js:93:12)
    at apm-server.js:37:70

Provide logs and/or server output (if relevant):

POST https://<private_url>/intake/v2/rum/events net::ERR_CONNECTION_TIMED_OUT
(anonymous) @ VM91:1
(anonymous) @ xhr-patch.js:102
U.r.<computed> @ patch-utils.js:46
(anonymous) @ apm-server.js:145
e._makeHttpRequest @ apm-server.js:104
e._postJson @ apm-server.js:55
e.sendEvents @ apm-server.js:323
(anonymous) @ apm-server.js:33
e.flush @ queue.js:34
(anonymous) @ queue.js:20
setTimeout (async)
e._setTimer @ queue.js:19
e.add @ queue.js:46
(anonymous) @ throttle.js:20
e.addTransaction @ apm-server.js:228
(anonymous) @ performance-monitoring.js:89
(anonymous) @ event-handler.js:35
e.sendOnly @ event-handler.js:33
e.send @ event-handler.js:46
(anonymous) @ transaction-service.js:251
Promise.then (async)
e.handleTransactionEnd @ transaction-service.js:217
r.onEnd @ transaction-service.js:199
e.callOnEnd @ span-base.js:75
i.end @ transaction.js:113
i.detectFinish @ transaction.js:96
i.removeTask @ transaction.js:139
e.removeTask @ transaction-service.js:351
e.processAPICalls @ performance-monitoring.js:222
(anonymous) @ performance-monitoring.js:161
(anonymous) @ event-handler.js:35
e.sendOnly @ event-handler.js:33
e.send @ event-handler.js:45
(anonymous) @ index.js:14
c @ xhr-patch.js:27
(anonymous) @ xhr-patch.js:59
setTimeout (async)
(anonymous) @ utils.js:291
u.<computed> @ xhr-patch.js:57
load (async)
u @ xhr-patch.js:73
(anonymous) @ xhr-patch.js:117
U.r.<computed> @ patch-utils.js:46
yr @ clarity.js:2
(anonymous) @ clarity.js:2
(anonymous) @ clarity.js:2
(anonymous) @ clarity.js:2
o @ clarity.js:2
Promise.then (async)
s @ clarity.js:2
(anonymous) @ clarity.js:2
Q @ clarity.js:2
br @ clarity.js:2
(anonymous) @ clarity.js:2
setTimeout (async)
D @ clarity.js:2
gr @ clarity.js:2
(anonymous) @ clarity.js:2
(anonymous) @ clarity.js:2
(anonymous) @ clarity.js:2
(anonymous) @ clarity.js:2
Q @ clarity.js:2
er @ clarity.js:2
Ie @ clarity.js:2
(anonymous) @ clarity.js:2

Hi @Vaibhav_Lodha,

Could you share with me what version of 1. ELK stack 2. APM server you are using? We've made a few improvements and APM also had a few changes over time so it is important to understand your exact setup in order to give you the correct guidance.

Also, it seems like you are using a relatively older version of RUM agent. We recommend you to use our latest version (5.11.1 as of today) as we've made many improvements since then!

Meanwhile, in case you are using 8.x, we recommend you to double check integration installation part. We had a few cases the clients got the timeout response from APM server as the integration wasn't installed.

Thanks,
Kyungeun

Hi @Vaibhav_Lodha,

Have you had time to check my colleague comment?

Thanks,
Alberto

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