How to clear/handle stuck jobs when using the enqueue/job-queue?
Hi, I have one issue where the child job status is enqueue.job_queue.status.success but it's root job still in enqueue.job_queue.status.running status. So leaving the records (root and child) in enqueue_job_unique table and causing the subsequent jobs (same name) not able to run. I can clear it from database manually, just wondering if there is any better way to do so?
I think this is a bug.
I see, I see try to get the reproduction steps for this if possible. Need to do some debugging to get the details.
I'm going to put this here because although it doesn't exactly match the ops issue. It does match the title, and is very much along the same lines.
If the queue consumer crashes, jobs get left in enqueue.job_queue.status.running. This situation also leaves subsequent jobs unable to run, just as in the ops situation.
Is there a way to gracefully handle this barring manually deleting them?
@leigh-ols what queue transport do you use? What you've said should not be the case for RabbitMQ
In local development at the moment, and so only using FS queue transport. Could this be an issue pertaining specifically to enqueue/fs?
yes, it is the issue. FS transport does not keep track of lost messages. If there is an exception or the process is killed the message is lost.
That's fine, it's only for testing/dev purposes anyway. I was more concerned about issue persisting into production. We'll be using a different transport in production, so my concerns have been allayed.
I have the same problem as @aun408 when I run many consumers. It works fine if I run only one.
there is a pull request in #786 that could fix the bug.
another workaround is to use the --message-limit option to 1.
`php bin/console enqueue:consume --message-limit=1``
works for me using supervisord.
@Kevlys please create PRs to this repository, instead of sub-repositories that are read-only. Thanks ;)
@Steveb-p I did'nt create any PRs anywhere. I just referenced it.
@Kevlys sorry, I didn't look and assumed it was yours. Apologies :bowing_man:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.