Hi everyone,
I am struggling a bit with the speed of my odoo 10 backend. Here are the spec of the instal
Hardware : VM instance on google cloud engine (n1-standard-2 (2 vCPUs, 7.5 GB memory))
Os : Ubuntu 16.04
Software : Odoo 10.1 + python2.7 + postgresl 10
Web server : nginx
I have followed the recommendation found on this website for speed optimization : https://www.rosehosting.com/blog/how-to-speed-up-odoo/
Here is my current odoo config file :
[options]
addons_path = /usr/lib/python2.7/dist-packages/odoo/addons,/usr/lib/python2.7/dist-packages/odoo/custom-addons
admin_passwd = ***************
csv_internal_sep = ,
data_dir = /var/lib/odoo/.local/share/Odoo
db_host = False
db_maxconn = 64
db_name = False
db_password = False
db_port = False
db_template = template1
db_user = odoo
dbfilter = .*
demo = {}
email_from = False
geoip_database = /usr/share/GeoIP/GeoLiteCity.dat
limit_time_real_cron = -1
list_db = True
log_db = False
log_db_level = warning
log_handler = :DEBUG
log_level = debug_rpc
logfile = /var/log/odoo/odoo-server.log
logrotate = True
longpolling_port = 8072
max_cron_threads = 2
osv_memory_age_limit = 1.0
osv_memory_count_limit = False
pg_path = None
pidfile = None
proxy_mode = True
reportgz = False
server_wide_modules = web,web_kanban
smtp_password = False
smtp_port = 25
smtp_server = localhost
smtp_ssl = False
smtp_user = False
syslog = False
test_commit = False
test_enable = False
test_file = False
test_report_directory = False
translate_modules = ['all']
unaccent = False
without_demo = False
workers = 5
limit_memory_hard = 4026531840
limit_memory_soft = 3355443200
max_cron_threads = 2
xmlrpc = True
xmlrpc_interface = 127.0.0.1
netrpc_interface = 127.0.0.1
xmlrpc_port = 8069
in my posrtgresl.conf file I set
effective_cache_size = 3750MB
and here is the nginx server config file
#odoo backend
upstream odoo {
server 127.0.0.1:8069;
}
upstream odoo-im {
server 127.0.0.1:8072 weight=1 fail_timeout=0;
}
#http -> https
server {
listen 80;
server_name www.****.com;
#location / {
#if ($request_uri !~ /pos/web/.) {
rewrite ^(.*) https://$host$1 permanent;
#}
#}
}
#https site
server {
listen 443;
server_name www.****.com;
#Headers for odoo proxy mode
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
# Let the OpenERP web service know that we’re using HTTPS, otherwise
# it will generate URL using http:// and not https://
proxy_set_header X-Forwarded-Proto https;
# by default, do not forward anything
proxy_redirect off;
proxy_buffering off;
#SSL parameters
ssl on;
ssl_certificate /etc/letsencrypt/live/****.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/****.com/privkey.pem; # managed by Certbot
ssl_session_timeout 30m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'ALL:!ADH:!MD5:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM';
ssl_prefer_server_ciphers on;
# Log
access_log /var/log/nginx/odoo.access.log;
error_log /var/log/nginx/odoo.error.log;
# Redirect POS to http
#location ~ ^/pos/web {
#rewrite ^(.*) http://$host$1;
#}
# Proxy buffers
proxy_buffers 16 64k;
proxy_buffer_size 128k;
# cache static data in memory for 30mins
# under heavy load this should relieve stress on the OpenERP web interface a bit
location ~* /web/static/{
proxy_cache_valid 200 30m;
proxy_buffering on;
expires 864000;
proxy_pass http://odoo;
}
#general proxy settings
# force timeouts if the backend dies
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;
#Redirect requests to odoo backend server
location / {
proxy_redirect off;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_pass http://odoo;
}
location /longpolling {
proxy_pass http://odoo-im;
}
}
We have about 500-1000 articles in the database (which is really not much at all) and here is a video of how slow it is in the backend when we are going through products.
https://www.youtube.com/watch?v=S5m5PndtG3c (I pressed F5 at the beginning of the video)
So is this normal behavior for odoo? What about the grey loading overlay why does it come up all the time and sometimes even twice in a row?
Thanks for any help, it will be greatly appreciated.
Hugues.
log_db_level = warning
log_handler = :DEBUG
log_level = debug_rpc
do you always need debug logs ?