Socket hang up with ExpressJS

Hi all,
I've setup my server with elastic-apm-node, and it run ok. But after a period of time (30-60 min), it causes an error like below:

Error: socket hang up
    at createHangUpError (_http_client.js:331:15)
    at Socket.socketOnEnd (_http_client.js:423:23)
    at emitNone (events.js:111:20)
    at Socket.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1055:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)

This error made my server down too, so I need to restart it. After removed the code, everthing okay now.
This is my config code:

require('elastic-apm-node').start({
  serviceName: '...',
  secretToken: '...',
  instrument: true,
  captureBody: 'all',
  errorOnAbortedRequests: true,
  serverUrl: 'http://...:8200',
  active: process.env.NODE_ENV === 'production'
})

Version

Elasticsearch, Kibana, APM v6.2.1
NodeJS v8.9.4
ExpressJS v4.15.2

I searched for this error, but there's no results with apm-server. Is this a known issue, or my configuration miss something? Please help me to fix this.
Thanks!

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