Skip to content

Session Randomly dropped by the server | ECONNRESET #251

@sam08sk

Description

@sam08sk

Hello,

I have a decent understanding of this library. However, I cannot resolve a random disconnection issue that keeps happening. Every few minutes or sometimes hours, the client gets disconnected from the SMPP server and gives only the following error in the logs

2024-03-22T11:30:38: Error: read ECONNRESET
2024-03-22T11:30:38:     at TCP.onStreamRead (node:internal/stream_base_commons:217:20) {
2024-03-22T11:30:38:   errno: -104,
2024-03-22T11:30:38:   code: 'ECONNRESET',
2024-03-22T11:30:38:   syscall: 'read'
2024-03-22T11:30:38: }

I have tried inspecting this but there is no error I can pinpoint that cause this. TCP dump taken reveals that the server sends [FIN, ACK] packet that causes disconnection. My best guess is that the client does not send "enquire_link" quickly enough and this causes disconnection. The client cannot change the enquire_link_interval period which is 60 seconds. Is there a way to increase the window we wait for enquire_link PDU before we disconnect? Is my understanding flawed here?

Also, I tried handling this by using session.on("error", (){}) but it doesn't work. I cannot even catch and log this error.

I would appreciate any help.

-Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions