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

onIdle is not triggered #260

Closed
pavkatar opened this issue Nov 10, 2017 · 2 comments · Fixed by #265
Closed

onIdle is not triggered #260

pavkatar opened this issue Nov 10, 2017 · 2 comments · Fixed by #265
Labels

Comments

@pavkatar
Copy link

pavkatar commented Nov 10, 2017

The onIdle function of the extensions is not triggered, when the consumer is active and waiting for messages but no messages in queue.

Nothing happens, after: "Start consuming"

2017-11-10T11:08:37+00:00 INFO (6): Preparing "QueueName" queue
2017-11-10T11:08:37+00:00 DEBUG (7): Set context's logger Zend\Log\PsrLoggerAdapter
2017-11-10T11:08:37+00:00 INFO (6): [StatusManagerExtension] Initiated
2017-11-10T11:08:37+00:00 DEBUG (7): [ReConnectDatabaseExtension] Timer started: "1510312117"
2017-11-10T11:08:37+00:00 INFO (6): Start consuming
@makasim
Copy link
Member

makasim commented Nov 10, 2017

I believe it is because of zero timeout which means amqp endlessly waits on a socket for a message.
There is no way from php to stop it.

So, add --receive-timeout=10000 (10 sec) option to consume cmd. There is no silver bullet for what the timeout should be. Small one plays badly with CPU. Big one is not good for example when you have to deal with signals.

Please let know if it doesn't solve your problem.

@pavkatar
Copy link
Author

Works with pull request #265

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.

2 participants