queue icon indicating copy to clipboard operation
queue copied to clipboard

[16.0] Job queues not running, stuck on pending

Open tusharkimbal opened this issue 1 year ago • 6 comments

Module

queue_job

Bug

I am using Odoo 16 Enterprise and have started utilizing the queue_job module for some processes. My Odoo instance is running on AWS ECS, and I am using a Queue Job Runner on EC2. Initially, everything was functioning well, but now the jobs are stuck in the ‘started’ state.

My odoo.conf for jobrunner

Affected versions: odoo 16+e

This below config I am using on EC2 specifically for queue_job runner server_wide_modules = web,queue_job

[queue_job] channels = root:4 host = <my_host> port = 443 scheme = https jobrunner_db_user = odoo jobrunner_db_host = 10.10.1.192 jobrunner_db_password = odoo jobrunner_db_port = 5432

tusharkimbal avatar Sep 24 '24 18:09 tusharkimbal

Are you seeing any timeouts in the logs? I intermittently suffer from queue job workers timing out and not recovering. I usually end up slicing my jobs into smaller batches so that they finish with plenty of time to spare.

amh-mw avatar Sep 25 '24 12:09 amh-mw

Hi @tusharkimbal

You need to configure this options in odoo.conf,looks like you have configured.

image

wsoftprodev2 avatar Oct 17 '24 10:10 wsoftprodev2

Hi @tusharkimbal

Did you find a solution or workaround?

I have the same problem

Thanks

lapinzon avatar Feb 05 '25 23:02 lapinzon

for me queue jobs don't run for sale-channel with connector_search_engine.

I see the server action triggering them but all methods having with_delay don't run.

When I set priority=1 no value.

Only if I assigned this: QUEUE_JOB__NO_DELAY=1 or similar to override delay, so I guess the issue with delaying functionality.

kobros-tech avatar Apr 15 '25 18:04 kobros-tech

@sbidoul

what I have is a bug.

kobros-tech avatar Apr 15 '25 18:04 kobros-tech

I had the issue solved once I increased the number of workers to 6, more than the number of channels! I also set there values in the configuration file of odoo.conf:

`

  • Keep in mind that the number of workers should be greater than the number of channels. queue_job will reuse normal Odoo workers to process jobs. It will not spawn its own workers.

  • Using the Odoo configuration file:

.. code-block:: ini

[options] (...) workers = 6 server_wide_modules = web,queue_job

(...) [queue_job] channels = root:2

  • Environment variables have priority over the configuration file.

  • Confirm the runner is starting correctly by checking the odoo log file:

.. code-block::

...INFO...queue_job.jobrunner.runner: starting ...INFO...queue_job.jobrunner.runner: initializing database connections ...INFO...queue_job.jobrunner.runner: queue job runner ready for db ...INFO...queue_job.jobrunner.runner: database connections ready `

kobros-tech avatar Apr 16 '25 10:04 kobros-tech

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

github-actions[bot] avatar Oct 19 '25 12:10 github-actions[bot]