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

client unexpectedly closed TCP connection #58

Closed
sm2017 opened this issue Feb 8, 2018 · 10 comments
Closed

client unexpectedly closed TCP connection #58

sm2017 opened this issue Feb 8, 2018 · 10 comments

Comments

@sm2017
Copy link

sm2017 commented Feb 8, 2018

In rabbitmq logs I see too many client unexpectedly closed TCP connection

@jakubkulhan
Copy link
Owner

Hi! This happened to me when there was a load balancer between the clients and the broker with idle timeout lower than heartbeat.

Even if there is no LB, I guess this happens because of setting heartbeat timeout too low. Default is 60 seconds. If you do in consumers any work longer than that, the PHP cannot send heartbeat packet to the broker, therefore the connection gets closed.

@sm2017
Copy link
Author

sm2017 commented Feb 9, 2018

@jakubkulhan there is no load balancer and my heartbeat timeout is 60 seconds
I have no works longer that 5 seconds

@jakubkulhan
Copy link
Owner

Do you use sync, or async client? For sync client you have to call Client::run(). Async client need to be passed React event loop and then event loop's run() method has to be called.

@sm2017
Copy link
Author

sm2017 commented Feb 9, 2018

I use async client and do as you told
My code is running for months , it is a long running php
After days I see in my application rabbit m client is not working well , I see client unexpectedly closed TCP connection in rabbitmq log

@jakubkulhan
Copy link
Owner

I don't see a reason why this happens. If it happens only after days of the consumer running, try checking if there are no memory leaks (cycles) that could cause long GC pauses.

@sm2017
Copy link
Author

sm2017 commented Feb 11, 2018

@jakubkulhan I see in rabbitmq logs that 0.5 second after connection is established . connection closed with client unexpectedly closed TCP connection error

@sm2017
Copy link
Author

sm2017 commented Feb 14, 2018

@jakubkulhan Do you know why the connection is closed after less that a seconds?
And rabbit mq server detect it is client unexpectedly closed TCP connection ?

@jakubkulhan
Copy link
Owner

Duplicated in #59

@sm2017 sm2017 mentioned this issue Mar 10, 2018
@iskripka
Copy link

@sm2017 did you manage to solve the problem with client unexpectedly closed TCP connection?

@sm2017
Copy link
Author

sm2017 commented May 12, 2021

@iskripka it's for years ago, I don't remember

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

3 participants