Reputation: 5174
I am trying to run Odoo8 in multiprocessing mode using --workers
option. It runs fine without --workers
parameter but with the --workers
parameter it gives me error
socket.error: [Errno 98] Address already in use
It seems like each of the worker process is trying to bind to one port.
Here is my run configuration
python openerp-server --addons-path my_adons_paths --db_user my_db_user --db_password my_db_password --db-filter my_db_to_use --no-database-list --workers 2
Am I doing something wrong here or there is some bug in Odoo?
I have checked there is no process already running on 8069 port, also server runs fine without --workers 2
parameter. That is with
python openerp-server --addons-path my_adons_paths --db_user my_db_user --db_password my_db_password --db-filter my_db_to_use --no-database-list
Upvotes: 2
Views: 1191
Reputation: 5174
Ok, I got the issue resolved!
Problem was from my side. For debugging (which has not been possible without this) I had evented = False
in my odoo/openerp/__init__.py
file.
To be more specific I had these lines commented
if sys.modules.get("gevent") is not None:
evented = True
Which caused the issue, setting it to True again (enabling the above lines) solved the problem.
Upvotes: 2
Reputation: 10189
I also have a lot of problems when I set workers greater than zero. It's very weird that you are getting the error Address already in use and you don't have any process running there. When I get that error, I kill all processes running on the Odoo port and then I can start Odoo again.
Just in case, try doing this before starting the Odoo server again:
sudo fuser -k 8069/tcp
Upvotes: 2