bunny icon indicating copy to clipboard operation
bunny copied to clipboard

Fix drop connection by RabbitMQ

Open viras777 opened this issue 4 years ago • 5 comments

Fix if RabbitMQ closed the connection due to incorrect login/password. Similar problems in here issues: Change state to error when ClientException is throw #115 or Failing connections cause exceptions thrown outside of Promise #74 or ClientException #59

viras777 avatar Nov 21 '21 12:11 viras777

Thank you for filing this PR, could you rebase on the latest changes in master now that #106, and do you think it is possible to test this?

WyriHaximus avatar Mar 16 '22 17:03 WyriHaximus

I tested on my test server and now works on the production server

viras777 avatar Mar 17 '22 18:03 viras777

@viras777 Thanks for the update. Any clue what it fails for certain jobs?

WyriHaximus avatar Mar 17 '22 21:03 WyriHaximus

In the function awaitConnectionTune I added interception of all exceptions to be able to process in reject. like this: Connection = (new Client())->connect()->then()->otherwise();

Because of this, the tests do not pass, they expect another type of exception

viras777 avatar Mar 18 '22 09:03 viras777

Sometimes there are missed hearbeats with an error on the rabbitmq server: "missing heartbeats from client, timeout: 60s" and bunny take 100 CPU for a while. This happens when $nextStreamSelectTimeout < $ now < $ stopTime For example call method run(1) and wait 60s

viras777 avatar Mar 11 '23 07:03 viras777