As an Odoo instance gets larger and larger, with more users logging in, more modules in use, more data passing through the system, it feels the pressure. Pages take longer to load, processes take longer to complete, and what was once seamless and easy becomes a hassle. This is where the right worker configuration comes into play: Not as an optional enhancement but as a basic requirement for getting good performance from the platform.
Setting up workers well in Odoo 19 is one of the biggest keys to scaling your system. It allows the server to process requests at the same time rather than processing them 1 at a time, which helps transform your Odoo instance from a single-lane road into an excellently designed highway, allowing your data traffic to move effectively, consistently, and seamlessly to support growth going forward.
Understanding What Workers Actually Do
Odoo 19 will begin to develop more latency as it gains users; however, that latency will build up over time, one second at a time, until Odoo 19 starts to feel heavy. This slow lag is due to Odoo’s method of handling incoming requests. By default, each request is processed sequentially, which works well in the beginning; however, sequential processing does not scale to the amount of time it takes for Odoo to complete each request.
To speed up Odoo 19 and provide the ability to provide consistent performance to users, Odoo implemented workers. Workers allow Odoo to process requests in parallel by creating multiple processes that are spawned to handle multiple requests at the same time. As opposed to using one single thread to wait on the completion of each action, multiple workers divide the load among themselves and provide faster service and more consistent service to users. As a result, users can no longer block each other, and Odoo feels responsive even when there are multiple requests being processed.
Workers in Odoo 19 are configured in the Odoo.conf file, the name of the configuration file is standard. Once the worker setting in odoo.conf has been enabled, the setting must be made in accordance with the available capacity of the server. A widely used method for determining how many workers to enable in Odoo is to set the number of workers to the number of available CPU cores. The basic idea is straightforward: CPU cores can handle multiple processes, but CPU cores can only handle as many processes as available memory will allow for an undetermined number of processes, until available memory becomes constrained.
Following is an example of a standard and correct Base-level Configuration
[options]
; Enable multiprocessing
workers = 5
; Memory limits (in bytes)
limit_memory_soft = 629145600 ; 600 MB
limit_memory_hard = 786432000 ; 750 MB
; CPU and real-time limits (in seconds)
limit_time_cpu = 60
limit_time_real = 120
; Background job threads
max_cron_threads = 2
; Longpolling for real-time features
longpolling_port = 8072
This configuration ensures many things happen primarily unnoticed. Multiple requests are allowed to use Odoo; a worker will never have the ability to consume too much memory by exceeding its allocated limit, and all long-running processes will also be limited. These limitations act as safeguards but also support the overall stability of the system during peak loads.
Now, the question that naturally follows is: how many workers should you actually use? There’s a well-known formula often used in Odoo deployments:
workers = (CPU cores × 2) + 1
For a server with two CPU cores, you can configure about five worker processes. But remember this isn’t an absolute rule; memory is equally important. The average memory used per worker can be anywhere between 200MB and 300MB, depending on what modules you’re using and their workload. If your server is running with eight GB of RAM (Example), then you cannot reserve all this RAM for your workers, as there still needs to be enough left over for the operating system, PostgreSQL, etc.
To get a better sense of balancing CPU and memory:
- Assume ~2GB of RAM will be reserved for the OS and other system processes first.
- Take how much RAM is left (~6GB in our previous example) and divide it by ~250MB to find the available number of workers. In this case, ~24 workers.
- Choose the smaller number between the CPU calculated total and the total calculated from system RAM usage.
In the end, personal experience will always trump laying out specific numbers/formulae for the number of workers to run. An overloaded system will crash much more frequently than a well-balanced and managed system with fewer workers.
Another frequently neglected detail is longpolling. Many systems rely on longpolling to provide live chat, bus alerts, and other real-time functionalities. If the configuration is off, these services can deliver delayed or inconsistent results. When you set up a dedicated longpolling_port, longpolling traffic will be processed separately from standard HTTP traffic, and will always work in real-time.
Odoo running behind Nginx is how production systems should operate. Nginx also serves as a reverse proxy to handle routing of incoming requests while ensuring that longpolling requests are kept separate from all other incoming requests. An example of a simple, but correctly configured, Nginx setup is shown here:
upstream odoo {
server 127.0.0.1:8069;
}
upstream odoo_longpolling {
server 127.0.0.1:8072;
}
server {
listen 80;
server_name your_domain.com;
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
location / {
proxy_pass http://odoo;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /longpolling {
proxy_pass http://odoo_longpolling;
}
}The separation of real-time features from routine request processing is critical to ensuring that routine requests can continue to function without competing for resources, especially as your number of users increases.
In the real world, you can see this difference. For example: let's say you have 15 users working simultaneously on sales and accounting. If workers have not been configured there will be delays while users validate invoices and load dashboards. When workers are configured properly, these actions will all run in parallel, and the system will stop feeling like a shared bottleneck and begin to function as a scalable platform.
However, you do want to avoid becoming too overconfident. A common pitfall is enabling more than enough workers with the hope of achieving better performance. This will most likely lead to exhausting system memory and server failure. Not setting limits on worker process utilization can also cause the system to fail since one resource-intensive worker could cause the entire server to crash.
Odoo will not recognize the modifications to your configuration until you restart the Odoo service:
sudo systemctl restart odoo
This step may seem trivial, but missing it often leads to confusion when changes don’t reflect.
In the end, setting up workers is not about pushing your server to its limits it’s about understanding those limits and working within them. When done thoughtfully, it creates a system that not only performs well today but remains stable as your business grows.
Odoo 19 requires performance to be built into the system from day one, rather than fixed at a later date. Configuring workers, like establishing the correct levels of CPU, memory and loads, is a foundational decision that directly affects Odoo’s ability to perform in a high-stress environment. It requires finding the right balance among CPU, RAM and actual use rather than just establishing high numbers and/or following a formula blindly.
When the workers are thoughtfully configured, the system breathes much more freely, enabling multiple users to work without stepping on one another. Background jobs can run without issues, and routine transactions take no effort. Although the change is small in terms of configuration, the actual difference it creates between just "running" versus "performing" is massive.
To read more about Overview of Performance Tuning in Odoo 19 Worker Configuration, refer to our blog Overview of Performance Tuning in Odoo 19 Worker Configuration.