Skip to content

Stuck queries #309

@orevenat

Description

@orevenat

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions