Odoo

odoo.conf recommendations

8 GB / 4 CPU cores server sample

workers = 8
limit_memory_hard = 4294967296
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 3600
limit_time_real = 7200
limit_time_real_cron = 0
max_cron_threads = 2
proxy_mode = True

48 GB / 12 CPU cores server sample

workers = 36
limit_memory_hard = 6442450944
limit_memory_soft = 4294967296
limit_request = 8192
limit_time_cpu = 3600
limit_time_real = 7200
limit_time_real_cron = 0
max_cron_threads = 4
proxy_mode = True

Explanations

workers

At least number of CPU x 2. On very busy and large servers it might even be bumped up to CPU x 4! (Our monitoring takes care if it would be too excessive)

limit_memory_hard

Recommended MAX 1/2th of total RAM. Find balance between RAM and unintended stopping of workers (no need for really small or extreme values on large servers either)

limit_memory_soft

Recommended MAX 1/4th of total RAM. Find balance between RAM and unintended stopping of workers (no need for really small or extreme values on large servers either)

limit_request

Maximum number of requests a single worker can handle before it restarts, could be set a bit higher on very high traffic installs or a bit lower on rarely visited Odoo's. Odoo's default of 8192 is fine in most cases!

limit_time_cpu

3600 means a max of 1 hours CPU time for a worker, which should be very high

limit_time_real

Maximum time a proces can live, 2 hours is plenty. Normally you should never want to hit this limit

limit_time_real_cron

0 Means no time limit on cron jobs, could also be set to 86400 to kill cron after 1 day (worst case)

max_cron_threads

Max number of concurrent crons, try to keep it lower than 1/3 the number of CPU's, with a max of half the number of CPU's

proxy_mode

Enable the proxy_mode in the odoo.conf, otherwise Odoo wont know that it is behind a reverse proxy and that the endpoint is in https

db_maxconn

Don't change this from default, the default of 64 is fine on our servers since PostgreSQL is tuned to allow many concurrent connections


Was this article helpful?

mood_bad Dislike 0
mood Like 4
visibility Views: 2080