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

v3.3.0 heartbeat error #1029

Closed
tlamy opened this issue Oct 4, 2022 · 4 comments · Fixed by #1030
Closed

v3.3.0 heartbeat error #1029

tlamy opened this issue Oct 4, 2022 · 4 comments · Fixed by #1030
Labels

Comments

@tlamy
Copy link

tlamy commented Oct 4, 2022

Version(s) affected: 3.3.0

Description
After upgrading from 3.2.0 to 3.3.0 our consumers die on a regular basis. From our logs:

2022-10-04 10:27:45.588+0000➜{"name":"PhpAmqpLib\\Exception\\AMQPConnectionClosedException: Broken pipe or closed connection"}

2022-10-04 12:27:45 | missed heartbeats from client, timeout: 60s
2022-10-04 12:27:45 | 2022-10-04 10:27:45.587 [error] <0.14529.62> closing AMQP connection <0.14529.62> (10.42.5.160:56444 -> 10.42.8.124:5672):

(The first log line is from our PHP consumer, the latter ones from rabbitmq running with +02:00 timezone offset).

Connections are created using $heartbeat parameter set to 0, which worked properly with v3.2.0.

So it seems to me the client can no longer disable heartbeats by setting the parameter to 0?

@tlamy
Copy link
Author

tlamy commented Oct 4, 2022

I even tried with $heartbeat set to 300 (since I may have really long consuming time for a message), and the server still closed the connection after 60 seconds.

I had to roll back to php-amqplib v3.2.0.

Version info:
RabbitMQ 3.8.16 on Erlang 23.3.4.1
PHP 8.0.24 (cli) (built: Sep 30 2022 23:48:52) ( NTS )

@dominicchinkh
Copy link

@tlamy
Copy link
Author

tlamy commented Oct 25, 2022

@dominicchinkh microtime(true) isn't microseconds.

microtime(true) returns a float, which represents the current time in seconds since the Unix epoch accurate to the nearest microsecond.

@dominicchinkh
Copy link

@dominicchinkh microtime(true) isn't microseconds.

microtime(true) returns a float, which represents the current time in seconds since the Unix epoch accurate to the nearest microsecond.

@tlamy, you are right. I miss the PHP doc.

@ramunasd ramunasd added the bug label Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants