user2379186
user2379186

Reputation: 431

Odoo 11 Workers

I cant figure out how to use workers in Odoo. I have a Server setup with ubuntu 16.04. nginx is installed and working.

My server will be running two databases. it has 16GB ram installed. This will be used by no more than 10 users.

Sever Cpu specs are 
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             AuthenticAMD
CPU family:            21
Model:                 2
Model name:            AMD FX(tm)-8350 Eight-Core Processor
Stepping:              0
CPU MHz:               1400.000
CPU max MHz:           4000.0000
CPU min MHz:           1400.0000
BogoMIPS:              8053.31
Virtualization:        AMD-V
L1d cache:             16K
L1i cache:             64K
L2 cache:              2048K
L3 cache:              8192K
NUMA node0 CPU(s):     0-7

My odoo-server conf is just standard as I am not sure what values to put in.

[options]
; This is the password that allows database operations:
admin_passwd = **********
xmlrpc_port = 8069
logfile = /var/log/odoo/odoo-server.log
addons_path=/odoo/odoo-server/addons,/odoo/custom/addons

Upvotes: 1

Views: 1190

Answers (1)

Adan Cortes
Adan Cortes

Reputation: 1068

In my experience, an Odoo server with 5-6 workers is fine for a 10-user setup

You'll need:

  • 1 for the main thread
  • 1 to 3 HTTP processing
  • 1 for Cron processing
  • 1 for PDF processing

Most of the code related to workers is in <path_to_v11>/odoo/service/server.py, you may want to read it.

Also, have a look at https://www.odoo.com/documentation/11.0/reference/cmdline.html to find the config/command line options.

In particular,

--workers <count> if count is not 0 (the default), enables multiprocessing and sets up the specified number of HTTP workers (sub-processes processing HTTP and RPC requests).

multiprocessing mode is only available on Unix-based systems

--limit-request <limit> Number of requests a worker will process before being recycled and restarted.

Defaults to 8196.

--limit-memory-soft <limit> Maximum allowed virtual memory per worker. If the limit is exceeded, the worker is killed and recycled at the end of the current request.

Defaults to 2048MiB.

--limit-memory-hard <limit> Hard limit on virtual memory, any worker exceeding the limit will be immediately killed without waiting for the end of the current request processing.

Defaults to 2560MiB.

Upvotes: 1

Related Questions