Skip to Content

How to Configure Odoo with Multiple Workers?

November 5, 2026 by

Configuring Odoo with multiple workers is a crucial element of ERP system performance optimization, especially in production environments serving many concurrent users. Proper worker configuration enables efficient server resource utilization and significantly improves application responsiveness.

What are workers in Odoo and why are they important?

Workers are independent worker processes that handle parallel user requests in the Odoo system. In the default configuration, Odoo runs in single-process mode, meaning it can only handle one request at a time within a single process. This solution works well during testing or in small installations, but becomes insufficient in production environments.

When we configure Odoo with multiple workers, the system creates a multi-process architecture that can simultaneously process multiple HTTP requests, which translates to:

  • Better performance with a large number of users
  • Shorter system response times
  • More efficient use of multi-core processors
  • Greater overall system stability through process isolation
  • Better handling of real-time functionality (websocket/longpolling)

Prerequisites for worker configuration

Before configuring Odoo with multiple workers, make sure that:

  • You have Odoo installed in a server environment (preferably Linux - Ubuntu 20.04+ or Debian 11+)
  • You have adequate hardware resources - minimum 4 GB RAM and a multi-core processor (2+ cores recommended)
  • You have access to the Odoo configuration file (odoo.conf or odoo-server.conf)
  • The system is installed according to best practices on Python 3.8 or newer
  • You have PostgreSQL database configured with an appropriate number of available connections

If you don't have Odoo installed yet, check out our guide on how to install Odoo in a Python virtual environment.

Worker configuration - parameters and settings

To configure Odoo with multiple workers, you need to edit the configuration file. Here are the key parameters:

Workers parameter

The main parameter specifying the number of worker processes. A value of '0' (default) means single-process mode without workers. To enable multi-process processing, set a value greater than zero:

workers = 4

The optimal number of workers depends on the number of CPU cores and available RAM. According to official Odoo documentation, the recommended formula is:

workers = (number_of_cores × 2) + 1

However, remember that each worker requires approximately 200-500 MB RAM, so the final number should account for available memory.

Max_cron_threads parameter

Specifies the maximum number of threads for scheduled tasks (cron jobs) in each cron worker:

max_cron_threads = 1

For most installations, a value of 1-2 is sufficient. By default, cron workers only run in the first process. Setting too high a value can overload the system and cause duplicate task execution.

Memory limits

Important parameters controlling memory usage by workers:

limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 60
limit_time_real = 120

limit_memory_soft - soft memory limit per worker (in bytes), after exceeding it the worker will be restarted after completing the current request. Recommended value: 2 GB (2147483648 bytes)

limit_memory_hard - hard memory limit, after exceeding it the worker is immediately terminated. Recommended value: 2.5 GB (2684354560 bytes)

limit_request - number of requests after which a worker is restarted (prevents memory leaks). Recommended value: 8192

limit_time_cpu - maximum CPU time in seconds for a single request. Recommended value: 60 seconds

limit_time_real - maximum real request processing time (wall time). Recommended value: 120 seconds

Database connections

A key parameter when configuring workers:

db_maxconn = 64

db_maxconn - maximum number of PostgreSQL connections. Should be higher than the number of workers. Recommended formula: db_maxconn = (workers × 2) + max_cron_threads

Longpolling workers

In Odoo 17/18, real-time functionality (notifications, chat, live updates) requires dedicated longpolling workers:

gevent_port = 8072

Longpolling workers use gevent and run on a separate port. They are automatically started when workers > 0.

Try Odoo for free

Complete configuration - example

Here's a sample configuration file for a server with 4 cores and 8 GB RAM (Odoo 17/18):

[options]
workers = 7
max_cron_threads = 1

; Memory limits
limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 60
limit_time_real = 120

; Database
db_maxconn = 64
db_host = localhost
db_port = 5432
db_user = odoo
db_password = your_password

; Longpolling for real-time functionality
gevent_port = 8072

; Standard settings
addons_path = /opt/odoo/odoo/addons,/opt/odoo/custom-addons
data_dir = /var/lib/odoo
logfile = /var/log/odoo/odoo.log
log_level = info

; Proxy (if using nginx/Apache)
proxy_mode = True

Configuration for different installation sizes

Small installation (1-10 users, 2 CPU cores, 4 GB RAM)

workers = 3
max_cron_threads = 1
db_maxconn = 32
limit_memory_soft = 1073741824
limit_memory_hard = 1342177280
limit_time_cpu = 60
limit_time_real = 120

Medium installation (10-50 users, 4 CPU cores, 8 GB RAM)

workers = 7
max_cron_threads = 1
db_maxconn = 64
limit_memory_soft = 2147483648
limit_memory_hard = 2684354560
limit_time_cpu = 60
limit_time_real = 120

Large installation (50+ users, 8 CPU cores, 16 GB RAM)

workers = 13
max_cron_threads = 2
db_maxconn = 128
limit_memory_soft = 2147483648
limit_memory_hard = 2684354560
limit_time_cpu = 60
limit_time_real = 120

Starting and verifying configuration

After making changes to the configuration file, restart the Odoo service:

sudo systemctl restart odoo

To verify that workers are running correctly, check system processes:

ps aux | grep odoo

You should see as many Odoo processes as you configured workers plus one master process, as well as additional longpolling processes.

You can also check system logs:

sudo tail -f /var/log/odoo/odoo.log

In the logs, you should see entries about worker startup, for example:

INFO ? odoo.service.server: Worker WorkerHTTP (PID) alive
INFO ? odoo.service.server: Worker WorkerCron (PID) alive
INFO ? odoo.service.server: Evented Service (longpolling) running on 0.0.0.0:8072

Additional configuration verification in the Odoo interface - as an administrator, go to Settings → Technical → Database Structure → Database where you'll see current connections and their utilization.

Contact us

Performance optimization and monitoring

After configuring workers, regular performance monitoring is essential. Pay attention to:

  • RAM usage - each worker consumes memory (200-500 MB), make sure you have sufficient resources. Use the command: free -h or htop
  • Load average - should not exceed the number of CPU cores long-term. Check with: uptime
  • PostgreSQL connections - monitor the number of active connections: SELECT count(*) FROM pg_stat_activity WHERE datname='your_database';
  • Response time - monitor application responsiveness through Odoo logs or APM tools
  • Error logs - regularly check if workers aren't being restarted too frequently (MemoryError, TimeoutError)

Also remember to create regular backups. Check out our guide on how to configure automatic backups in Odoo.

Try Odoo for free

Common problems and solutions

Problem: System uses too much memory

Solution: Reduce the number of workers or lower memory limits. You can also decrease the limit_request value so workers restart more frequently and release memory. Also check for memory leaks in custom modules.

Problem: Workers won't start

Solution: Check permissions for log and data directories. Make sure the Odoo user has appropriate write permissions. Also check systemd logs: sudo journalctl -u odoo -n 100

Problem: 'Too many connections' error in PostgreSQL

Solution: Increase the max_connections parameter in PostgreSQL (postgresql.conf file) or decrease db_maxconn in Odoo. Make sure the db_maxconn formula is properly applied.

Problem: Lower performance after enabling workers

Solution: This may result from too many workers relative to available resources (RAM, CPU). Test different configurations, starting with fewer workers. Check if disk I/O isn't a bottleneck.

Problem: Longpolling doesn't work, no real-time notifications

Solution: Check if gevent_port is open and accessible. If using nginx/Apache as a reverse proxy, make sure the proxy forwards WebSocket traffic to the appropriate longpolling port.

Additional security guidelines

When configuring multi-process Odoo, remember to:

  • Regularly update the system to the latest Odoo version (currently 17.0 or 18.0)
  • Secure access to configuration files (chmod 600 odoo.conf and appropriate owner: chown odoo:odoo)
  • Configure firewall and reverse proxy (nginx/Apache) with proper SSL/TLS
  • Set proxy_mode = True when using a reverse proxy
  • Restrict access to the longpolling port only through the proxy
  • Monitor logs for suspicious activity (multiple failed logins, DoS)
  • Configure rate limiting at the nginx/Apache level

For security purposes, also check out how to reset Odoo administrator password, which can be useful in emergency situations.

FAQ - Frequently Asked Questions

Can I enable workers in Odoo Community Edition?

Yes, the ability to configure workers is available in both Community Edition and Enterprise. This is not a feature limited to the paid version. Simply configure the odoo.conf file appropriately. Both Odoo 17 Community and Enterprise support multi-processing.

How many workers should I set for my server?

The optimal number depends on server resources. The recommended formula is (number of CPU cores × 2) + 1. For a server with 4 cores, this would be 9 workers. However, always test and monitor resource usage - especially RAM. Each worker uses about 200-500 MB of memory. Too many workers can lead to RAM exhaustion or exceeding the PostgreSQL connection limit.

Does worker configuration affect long operation performance?

Yes, positively. Workers allow parallel request processing, so when one user performs a long operation (e.g., generating a report, importing data), other users can still work normally in the system. Proper configuration of limit_time_cpu and limit_time_real parameters is important - for long operations it may be necessary to increase them at specific endpoints or use job queues available in Odoo Enterprise or through community modules.

Do I need to restart Odoo after every worker configuration change?

Yes, changes to the number of workers and memory limits require a full Odoo service restart. These changes are not loaded dynamically. Schedule restarts during lowest traffic times or use blue-green deployment strategy for critical installations.

Summary

Configuring Odoo with multiple workers is essential for production environments and significantly improves system performance. The key to success is adjusting parameters to specific conditions - installation size, number of users, and available hardware resources. In Odoo 17/18, proper configuration of longpolling workers for real-time functionality and ensuring an appropriate number of PostgreSQL connections through the db_maxconn parameter is particularly important.

Remember that each installation is different and may require individual parameter tuning. Test different configurations and observe system behavior under load. Monitor RAM usage, CPU, database connections, and system response times.

Need help with Odoo configuration?

Configuring multi-process Odoo can be complex, especially for sophisticated production installations. The KK Innovations team specializes in implementing and optimizing Odoo systems in the latest versions (17/18). We offer professional support in:

  • Odoo configuration and performance optimization
  • System deployment in production environments with high availability
  • Migration and upgrades to newer versions
  • Customization and development of dedicated modules
  • Security and performance audits of existing installations

Contact us to discuss your needs and receive professional help optimizing your Odoo system!

Contact us