Defining Workers not working on Amazon EC2 cloud servers, Is that necessary to configure nginx for workers ?

keriwala sakib

Hello there,

I am using Amazon cloud ec2 server and made one configuration file to run odoo 12 enterprise

Server Configuration

RAM - 64 GB

Core - 8 Core

Configuration file content is as following

; This is the password that allows database operations:
admin_passwd = admin
db_host = False
db_port = False
db_user = odoo
db_password = False
dbfilter = v12_enterprise_testing_2_27_11_2019
addons_path = /opt/odoo12/odoo/addons,/opt/odoo12/odoo_enterprise/enterprise,/opt/odoo12/odoo-custom-addons
xmlrpc_port = 8888
limit_time_cpu = 9999
limit_time_real = 19998

limit_memory_hard = 4294967296
limit_memory_soft = 2147483648
workers = 5
longpolling_port = 8072
proxy_mode = False
logfile = /opt/odoo12/logs/odoo-testing.log

Now here when workers=0 then system is running properly but when I will define workers > 0 then system will be very slow to respond

I have made service file and from service file I am running my odoo 12 enterprise server

What another configuration has been left to be done by me ?

Can anyone suggest me what to do ?

Is that necessary that to run workers, nginx should be configured ?

2 Answers
Ravi Gadhia
Best Answer

it's absolutely necessary to configure Nginx server while you active workers otherwise live chat will not work.

when you start the server start with worker odoo create dedicate gevent server to handle all the long polling request it starts at port 8072  and Nginx reverse proxy configuration divert all the `/logpolling/poll` request to this dedicated server.

worker help odoo to utilize all the CPU core of the machine. Due to famous python GIL threaded server could not utilize all the core of CPU

if you run a Preforked server without Nginx configuration then Bus.Bus doesn't dispatch result and continues traceback of bus sometimes it block the Postgres IO and it will slow the server.

you also need to configure Postgres server according to machine capacity

keriwala sakib
Best Answer

It worked after configuring nginx server and made domain

Restart odoo service again

Thank you so much for your kind help buddy