Troubleshooting workers that don't actively consume queue #449
-
How do I troubleshoot a worker that starts without error and seems to be able to accomplish tasks, but immediately enters an idle state and doesn't pick anything from the queue? I'll come back and answer my own question if I can, but I ask in case you have an intuition that might lead me in the correct direction. I've started up a single producer/worker, using basically the steps shown in the docs:
Tasks are added to the queue where they can be observed as available in the UI, but they are not consumed. When the client first starts up, waiting tasks will be processed, then it enters an idle state after which point no more tasks will be consumed. I notice that the My worker/client and the postgres server are both running inside of a Docker host on an M1 MacBook. I'll return here if I get an answer, meanwhile any steps for troubleshooting would be much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@tylergannon this is quite odd. My first advice would be to pass a logger to the river client with a high enough debug level to see internal details being logged. It will probably be noisy, but should help understand what’s happening here. The producer for each configured queue is responsible for fetching jobs periodically, and it does so on a cadence defined by the client’s fetch interval whether or not it gets NOTIFY messages about new jobs being inserted. Can you give that a shot as the first step and see if it reveals anything indicative of an issue? |
Beta Was this translation helpful? Give feedback.
-
🤦🏽 This particular issue could really only have been a programmer error, and indeed it was. My only hope was that I would render some useful advice for the next newcomer who arrived here. Sadly the error was so dumb that it won't really help anyone at all. I was effectively stopping the client immediately after starting it. All good now. Thanks for the response and I am glad to have found out how to adapt my Zap logger to the interface required by River. |
Beta Was this translation helpful? Give feedback.
🤦🏽
This particular issue could really only have been a programmer error, and indeed it was. My only hope was that I would render some useful advice for the next newcomer who arrived here.
Sadly the error was so dumb that it won't really help anyone at all. I was effectively stopping the client immediately after starting it.
All good now. Thanks for the response and I am glad to have found out how to adapt my Zap logger to the interface required by River.