I currently have two different databases on different machines that show the error below. The first appearance was a couple of months ago, sometimes appearing in magazines, sometimes several times in a row and in other cases only once during the day.
This only happens when Odoo starts with proxy_mode = True and / or number of employees> 0. When the proxy is disabled, the error stops.
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/http.py", line 638, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/odoo-server/odoo/http.py", line 675, in dispatch
result = self._call_function(**self.params)
File "/odoo/odoo-server/odoo/http.py", line 331, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/odoo-server/odoo/service/model.py", line 119, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/odoo-server/odoo/http.py", line 324, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/odoo-server/odoo/http.py", line 933, in __call__
return self.method(*args, **kw)
File "/odoo/odoo-server/odoo/http.py", line 504, in response_wrap
response = f(*args, **kw)
File "/odoo/odoo-server/addons/bus/controllers/main.py", line 35, in poll
raise Exception("bus.Bus unavailable")
Exception: bus.Bus unavailable
This is my current Nginx configuration:
upstream odoo10 {
server myipaddres:8069 weight=1 fail_timeout=0;
}
upstream odoo10-im {
server myipaddres:8072 weight=1 fail_timeout=0;
}
server {
listen 80;
server_name mydomain.com;
add_header Strict-Transport-Security max-age=2592000;
rewrite ^/.*$ https://$host$request_uri? permanent;
}
server {
listen 443 ssl;
server_name mydomain.com;
client_max_body_size 200m;
keepalive_timeout 60;
ssl on;
ssl_certificate /etc/ssl/nginx/mydomain.crt;
ssl_certificate_key /etc/ssl/nginx/mydomain.key;
ssl_ciphers HIGH:!ADH:!MD5;
ssl_protocols SSLv3 TLSv1;
ssl_prefer_server_ciphers on;
proxy_buffers 16 64k;
proxy_buffer_size 128k;
proxy_connect_timeout 600s;
proxy_send_timeout 600s;
proxy_read_timeout 600s;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect off;
proxy_buffering off;
location / {
proxy_pass http://odoo10;
}
location /longpolling {
proxy_pass http://odoo10-im;
}
location /web/static/ {
proxy_cache_valid 200 60m;
proxy_buffering on;
expires 864000;
proxy_pass http://odoo10;
}
}
And the corresponding part from etc / odoo-conf related to performance:
[options]
db_maxconn = 64
limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 600 limit_time_real = 1200 limit_time_real_cron = 2400
max_cron_threads = 2
osv_memory_age_limit = 1.0
osv_memory_count_limit = False
proxy_mode = True
workers = 5 xmlrpc = True
xmlrpc_interface = myipaddress
netrpc_interface = myipaddress
He currently works on the Digital Ocean infrared infrastructure, on a machine with 2 GB of RAM and 2 processor cores.