Stuck queries
orevenat opened this issue · 3 comments
Hello! Thanks for que.
We are using Que 1.x with Rails in production, but eventually que stop executing jobs after booting up. It's happens in few hours or days.
In logs - nothing.
When I run que with --log-internals and --log-level debug it stuck always faster, in 10-15 mins. Last logs was this:
{"lib":"que","hostname":"4f70692a5de3","pid":1,"thread":78180,"internal_event":"worker_pushing_finished_job","object_id":74220,"t":"2021-06-25T13:13:16.384476Z","id":364707}
{"lib":"que","hostname":"4f70692a5de3","pid":1,"thread":74300,"internal_event":"connection_execute","object_id":74320,"t":"2021-06-25T13:13:16.384551Z","backend_pid":78536,"command":" SELECT id\n FROM public.que_jobs\n WHERE finished_at IS NULL\n AND expired_at IS NULL\n AND id IN (364716)\n","params":[],"ntuples":1}
{"lib":"que","hostname":"4f70692a5de3","pid":1,"thread":74300,"internal_event":"job_buffer_push","object_id":74120,"t":"2021-06-25T13:13:16.384652Z","maximum_size":8,"ids":[364716],"current_queue":[]}
In our locks this:
select count(*) from pg_locks where locktype = 'advisory';
count
-------
3282
Any idea what happened here? How i can fix that issue?
Possibly related to this... #285
Hi @orevenat, I'm thinking this is either due to #285 or #298. Both are fixed now in current master, so I'm going to close this issue. We'll be publishing a release soon (in the meantime, you could get Bundler to use the gem from Git). If the problem recurs, please do let us know =) (and include the specific version)
Hi @orevenat, I'm thinking this is either due to #285 or #298. Both are fixed now in current master, so I'm going to close this issue. We'll be publishing a release soon (in the meantime, you could get Bundler to use the gem from Git). If the problem recurs, please do let us know =) (and include the specific version)
Hi @ZimbiX. Yes, this both helped me with my problems with stuck queries and growing lock count.