Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie

Hello, everyone! Yesterday I was playing/tuning with my Odoo, PostgreSQL, and Linux Kernel. But, the result is not like I expected. Often get 502 Bad Gateway nginx. Can someone help me through this?

My Spec:

8CPU

32 GB RAM

400 GB 

400 GB NVMe Disk Space


Here's my configuration:

Nginx sites enabled:

#odoo server

upstream odoo {

server 127.0.0.1:8069;

}

upstream odoochat {

server 127.0.0.1:8072;

}



server {

listen 80;

server_name (my IP address);


proxy_read_timeout 720s;

proxy_connect_timeout 720s;

proxy_send_timeout 720s;



# Add Headers for odoo proxy mode

proxy_set_header Host $host;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header X-Forwarded-Proto $scheme;

proxy_set_header X-Real-IP $remote_addr;


# log

access_log /var/log/nginx/odoo\.access\.log;

error_log\ /var/log/nginx/odoo.error.log;


# Redirect requests to odoo backend server

location / {

proxy_redirect off;

proxy_pass http://odoo;

}

location /longpolling {

proxy_pass http://odoochat;

}


# common gzip

gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;

gzip on;



client_body_in_file_only clean;

client_body_buffer_size 32K;

client_max_body_size 500M;

sendfile on;

send_timeout 600s;

keepalive_timeout 300;

}


Odoo.conf:

admin_passwd = -

db_host = localhost

db_name = False

db_password = -

db_port = 5432

db_sslmode = prefer

db_template = template0

db_user = limomoli

http_port = 8069

logfile = /var/log/limomoli/limomoli-server.log

addons_path=/limomoli/limomoli-server/addons,/limomoli/custom/addons

proxy mode = True

workers = 15

limit_memory_hard = 15360000000

limit_memory_soft = 12288000000

max_cron_threads = 2

limit_request = 8192

limit_time_cpu = 600

limit_time_real = 1200

log_level = debug_rpc


PostgreSQL conf:

max_connections = 100

shared_buffers = 15GB

effective_cache_size = 24GB

maintenance_work_mem = 2GB

checkpoint_completion_target = 0.9

wal_buffers = 16MB

default_statistics_target = 100

random_page_cost = 1.1

effective_io_concurrency = 200

work_mem = 20971kB

huge_pages = on

min_wal_size = 1GB

max_wal_size = 4GB

max_worker_processes = 8

max_parallel_workers_per_gather = 4

max_parallel_workers = 8

max_parallel_maintenance_workers = 4

synchronous_commit = off


Linux Kernel:

vm.nr_hugepages=7889

vm.swappiness=1

vm.overcommit_memory=2

vm.dirty_background_ratio=5


Really appreciate every help, thank you!

Awatar
Odrzuć

can you see if the odoo service is still running or not

Autor

yep, it's still running

can you check the nginx access log and error log to see if there is any information

Can you check about Odoo and custom module directory access was given correctly with the Odoo user?

Thanks

Powiązane posty Odpowiedzi Widoki Czynność
2
lut 25
11480
1
lis 23
2312
1
sie 23
3195
1
wrz 23
1382
0
cze 25
282