Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent NATS Disconnection Behind Load Balancer #376

Open
rithvikgupta opened this issue Dec 18, 2024 · 1 comment
Open

Intermittent NATS Disconnection Behind Load Balancer #376

rithvikgupta opened this issue Dec 18, 2024 · 1 comment

Comments

@rithvikgupta
Copy link

rithvikgupta commented Dec 18, 2024

We are experiencing disconnection issues when using NATS behind a load balancer. The client gets disconnected with the following error message:

10:42:38 Disconnected due to: read tcp 10.8.0.19:52465->51.21.46.456:4222: read: operation timed out, will attempt reconnect
10:42:41 Reconnected [nats://nats.uat.com:4222]
The connection is restored shortly after, but the disconnection disrupts application workflows. This issue occurs intermittently and seems related to the network configuration with the load balancer.

Deploy NATS server behind a load balancer.
Use a client to connect and observe intermittent disconnections.

Expected Behavior:
The client should maintain a stable connection to the NATS server without frequent disconnections.

Actual Behavior:
The client disconnects with a timeout error and reconnects after a short interval.

Logs:

Timestamp: 10:42:38
Error: Disconnected due to: read tcp 10.8.0.19:52465->51.21.46.456:4222: read: operation timed out
Possible Causes:

Can anyone help me to resolve this issue

@mtmk
Copy link

mtmk commented Dec 18, 2024

thanks @rithvikgupta for the report. what is the server version? Which client are you using and the version of it please?

fyi this repository is for the STAN project which is deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants