跳至内容
菜单
此问题已终结
1 回复
476 查看

So i have this instance on odoo 15  running on docker i tried to activate workers this error came up 
Traceback (most recent call last): 

odoo15 |   File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 962, in signal_time_expired_handler 

odoo15 |     raise Exception('CPU time limit exceeded.') 

odoo15 | Exception: CPU time limit exceeded.


plus this instance is becoming very slow 

this is my odoo.conf 
[options]

addons_path = /mnt/extra-addons

data_dir = /var/lib/odoo

proxy_mode = True

workers = 2

limit_memory_hard = 2684354560 # 2.5 GB 
limit_memory_soft = 2147483648 # 2 GB 
limit_request = 8192 
limit_time_cpu = 600 
limit_time_real = 1200


形象
丢弃
最佳答案

Hi,


If you’re getting the “CPU time limit exceeded” error after enabling workers, it usually means a worker process is taking too long to complete a request.

This can happen due to heavy operations, limited Docker resources, or strict time limits.


Here’s how to fix it:


Increase CPU Time Limit

Set limit_time_cpu = 1200 in your odoo.conf to give each worker up to 20 minutes of CPU time.


Increase Real Time Limit

Update limit_time_real = 2400 to allow 40 minutes of total wall time (covers I/O delays or slow queries).


Save and Restart Odoo

After making the changes, restart your Odoo container so the new limits take effect.


Tune Workers if Needed

If the issue persists, reduce the number of workers or review heavy scheduled actions and slow queries.


Hope it helps.

形象
丢弃