Recently we have been encountering large amount of 502 errors from the website.
It looks like socket errors on gunicorn. Also when I was looking in to this and read some of forum posts here regarding 502 issues I found out that there seems to be a problem with the supervisor setup somehow, even though it has been set up with
sudo bench setup production frappe
sudo supervisorctl status:
erpnext-bench-redis:erpnext-bench-redis-cache RUNNING pid 808, uptime 0:33:57 erpnext-bench-redis:erpnext-bench-redis-queue RUNNING pid 809, uptime 0:33:57 erpnext-bench-redis:erpnext-bench-redis-socketio RUNNING pid 810, uptime 0:33:57 erpnext-bench-web:erpnext-bench-frappe-web RUNNING pid 811, uptime 0:33:57 erpnext-bench-web:erpnext-bench-node-socketio RUNNING pid 812, uptime 0:33:57 erpnext-bench-workers:erpnext-bench-frappe-default-worker-0 RUNNING pid 814, uptime 0:33:57 erpnext-bench-workers:erpnext-bench-frappe-long-worker-0 RUNNING pid 824, uptime 0:33:57 erpnext-bench-workers:erpnext-bench-frappe-schedule RUNNING pid 813, uptime 0:33:57 erpnext-bench-workers:erpnext-bench-frappe-short-worker-0 RUNNING pid 815, uptime 0:33:57
As discussed here: 502 bad gateway nginx 1.2.1 it seems like supervisor configuration is not set properly as
sudo supervisorctl tail frappe:frappe-web returns
frappe:frappe-web: ERROR (no such process name).
I have setup the environment with
bench setup production and as such the supervisor config should be properly set but seems like it doesn’t work properly. After redoing the the
sudo bench setup production frappe I now get:
ubuntu@ip-172-31-43-14:~$ sudo supervisorctl status http://localhost:9001 refused connection
Any ideas how to fix this?