Skip to content

[Messenger] Long task after receiving the message - message is not removed from queue #31707

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

Closed
Valantir007 opened this issue May 29, 2019 · 7 comments

Comments

@Valantir007
Copy link

Symfony version(s) affected: 4.2.9

Description
I have one handler who receives a message - limit 1. This handler should gets ids from database and send messages to another queue. This task is very long - 15k messages. When task is very long, messenger calls ack function of "Connection" object but message is not deleted from queue.

How to reproduce
Create handler and send 15k messages to another queue.

@Valantir007 Valantir007 changed the title [Messenger] Long task after receiving the message and [Messenger] Long task after receiving the message - message is not removed from queue May 30, 2019
@weaverryan
Copy link
Member

@Valantir007 Which transport are you using? Does the messenger:consume finish successfully?

@Valantir007
Copy link
Author

Hi @weaverryan - I'm using Amqp. Yes, it does - the "messenger:consume" command has ended successfully but message is still with status "ready"... :/
Another thing I saw is that message is "unacknowledged" but after some time the message returns to "ready" but command is still working and processes the message.

@Tobion
Copy link
Contributor

Tobion commented May 30, 2019

When the message processing in the handler takes too long, it can be that rabbitmq regards it as failed and puts the message with a redelivered header back into the queue. You could check if that is the case.

@Valantir007
Copy link
Author

That's right. Do you know how to fix that?

@Valantir007
Copy link
Author

We took a look on this problem and we found issue with rabbitmq configuration on our server where rabbitmq is. I'm sorry for unnecessary task.

@Tobion
Copy link
Contributor

Tobion commented May 31, 2019

What was the issue?

@Valantir007
Copy link
Author

Valantir007 commented Jun 3, 2019

Sorry for long time answers but I had to ask our administrator. We have RabbitMq with load balancing and our administrator added option:

backend rabbitmq_backend: option clitcpka
and
timeout client 3h

to configuration. Now everything works perfect. More in this post:

https://serverfault.com/questions/589804/haproxy-configuration-for-rabbitmq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants