Hi,
We’ve migrated our app from heroku to fly.io, since then, our only client is having network errors a dozen of times per day when doing http requests toward our app hosted on fly.io.
Here is the error that happens on their side when they make a request toward our app:
Error: Client network socket disconnected before secure TLS connection was established
at connResetException (internal/errors.js:607:14)
at TLSSocket.onConnectEnd (_tls_wrap.js:1544:19)
at TLSSocket.emit (events.js:327:22)
at TLSSocket.EventEmitter.emit (domain.js:467:12)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
code: 'ECONNRESET',
path: null,
host: 'api.hootify.io',
port: 443,
localAddress: undefined,
config: {
url: '/private/notifications',
method: 'post',
data: '{"id": [TRUNCATED]}',
headers: {
Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/json;charset=utf-8',
Authorization: 'Bearer [REMOVED]',
'User-Agent': 'axios/0.21.1',
'Content-Length': 384
},
Client Details
The client app is hosted on AWS (running multiple instances with Elastic Beanstalk) and is written in node using axios to make http requests to ours. As said, most requests are going through to our app fly.io, but every now and then (~dozen times per day) some requests results in the error above.
Also, it does about 100-120 requests per minute toward our app.
Fly.io App Details
Our app is running two instances in fly.io in Europe (ams and fra). It is written in node and uses express as the server to answer http requests.
Can someone please help with this? Is there any network hiccups on fly.io side? How can we debug what is going wrong?
Also note that we are using the log sink (NATS and Vector) provided by fly.io to send logs from our apps to LogDNA, and that one also produces errors of interrupted connections in our app logs:
Feb 2 11:16:19 6b399e48 vector WARN sink{component_kind="sink" component_id=logdna component_type=logdna component_name=logdna}:request{request_id=36262}: vector::sinks::util::retries: Retrying after error. error=Failed to make HTTP(S) request: connection closed before message completed
Feb 2 11:57:15 6b399e48 vector WARN sink{component_kind="sink" component_id=logdna component_type=logdna component_name=logdna}:request{request_id=36514}: vector::sinks::util::retries: Retrying after error. error=Failed to make HTTP(S) request: connection error: Connection reset by peer (os error 104)