-
Notifications
You must be signed in to change notification settings - Fork 53
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
No reconnection attempts after connection timeout #118
Comments
Extra information: OS: Debian 11 Package installed Systemd Service File: /lib/systemd/system/amqproxy.service
Changing Restart to the following:
does not unfortunately fix the issue. |
Hi, We are also facing this issue with the newest v0.8.12. This makes our PHP processes wait indefinitely on a OS : Ubuntu 20.04 |
amqproxy will connect to the broker if you connect to it again, are you saying that is not the case? I think you need to check your clients |
If the connection is closed by the server, the socket stays open so our PHP processes do not see that the connection is not open anymore, and will indefinitely wait on a response from the AMQP server : php-amqp/php-amqp#35 |
Yeah I have been able to reproduce this – I hope to have a PR addressing it out this week |
This change also removes the code added in #104 The motivation behind that is * IO:_Error that happens in Upstream#connect is raised as Upstream::Error * IO::Error that happens in Upstream#read_loop is rescued in that method * IO::Error that happens in Client#read_loop is raised as Client::Error Adds an integration test with the php-amqp client run via Docker Compose and Toxiproxy. Close #118 Close #111 Close #98
This change also removes the code added in #104 The motivation behind that is * IO:_Error that happens in Upstream#connect is raised as Upstream::Error * IO::Error that happens in Upstream#read_loop is rescued in that method * IO::Error that happens in Client#read_loop is raised as Client::Error Adds an integration test with the php-amqp client run via Docker Compose and Toxiproxy. Close #118 Close #111 Close #98
AMQProxy 0.8.8
If the connection cuts out, no reconnection attempts are performed. Systemd shows the service as "active (running)" with the following being logged in the journal:
Error reading from upstream: Error reading socket: Connection timed out (IO::Error)
from usr/share/crystal/src/io/evented.cr:61:9 in 'unbuffered_read'
from usr/share/crystal/src/io/buffered.cr:261:5 in 'fill_buffer'
from usr/share/crystal/src/io/buffered.cr:83:9 in 'read'
from usr/share/crystal/src/io.cr:540:20 in 'read_fully?'
from usr/share/crystal/src/io.cr:523:5 in 'read_fully'
from tmp/amqproxy/lib/amq-protocol/src/amq/protocol/frames.cr:26:9 in 'read_loop'
from tmp/amqproxy/src/amqproxy/upstream.cr:34:7 in '->'
from usr/share/crystal/src/fiber.cr:146:11 in 'run'
from usr/share/crystal/src/fiber.cr:98:34 in '->'
from ???
It would be great if reconnection attempts can be performed or if the service could abort so Systemd can retry to start the service again.
Thanks in advance!
The text was updated successfully, but these errors were encountered: