Internal server error 10/08/16

Hi all,

I am getting an Internal server error when I run bench update in production server now.
(10/08/16 6:00pm)
Please help me solve it. How can I check the error logs? web.log file in logs folder is empty.
@rushabh_mehta bench-repo commit id is b34b1e1d27415b8ea0af60d4e5f9ed457f6c6dcc

hi @Amalendu,
please use the following Steps;
1.sudo supervisorctl reread
2.sudo supervisorctl reload
3.sudo supervisorctl status
4.sudo service nginx reload

Thanks
Sagar Shiragawakar
New Indictrans Technologies Pvt Ltd.

1 Like

@sagar

Thanks for the reply,

But the error is still there even though the commands have run successfully.
How can I solve this?

@Amalendu
output of this command?
sudo supervisorctl status

Thanks
Sagar Shiragawakar
New Indictrans Technologies Pvt Ltd.

@sagar

frappe-bench-redis:frappe-bench-redis-cache RUNNING pid 65280, uptime 15:14:54
frappe-bench-redis:frappe-bench-redis-queue RUNNING pid 65279, uptime 15:14:54
frappe-bench-redis:frappe-bench-redis-socketio RUNNING pid 65281, uptime 15:14:54
frappe-bench-web:frappe-bench-frappe-web RUNNING pid 65277, uptime 15:14:54
frappe-bench-web:frappe-bench-node-socketio RUNNING pid 65278, uptime 15:14:54
frappe-bench-workers:frappe-bench-frappe-async-worker RUNNING pid 65274, uptime 15:14:54
frappe-bench-workers:frappe-bench-frappe-longjob-worker RUNNING pid 65275, uptime 15:14:54
frappe-bench-workers:frappe-bench-frappe-worker RUNNING pid 65276, uptime 15:14:54
frappe-bench-workers:frappe-bench-frappe-workerbeat RUNNING pid 65273, uptime 15:14:54

@Amalendu
Try bench migrate
stop supervisor & nginx and retry above command.

Thanks
Sagar Shiragawakar
New Indictrans Technologies Pvt Ltd.

Hi @sagar

I have run ‘bench migrate’ and stopped both supervisor & nginx

Then I tried sudo supervisorctl reread

it shows now:
error: <class ‘socket.error’>, [Errno 2] No such file or directory: file: /usr/lib/python2.7/socket.py line: 224

sudo supervisorctl reload
error: <class ‘socket.error’>, [Errno 2] No such file or directory: file: /usr/lib/python2.7/socket.py line: 224

sudo supervisorctl status
unix:///var/run/supervisor.sock no such file

@Amalendu
start the supervisor & nginx

@sagar

ohh sad… wat to do…

Started and run all the commands
No errors

sudo supervisorctl status
frappe-bench-redis:frappe-bench-redis-cache RUNNING pid 24833, uptime 0:00:04
frappe-bench-redis:frappe-bench-redis-queue RUNNING pid 24832, uptime 0:00:04
frappe-bench-redis:frappe-bench-redis-socketio RUNNING pid 24834, uptime 0:00:04
frappe-bench-web:frappe-bench-frappe-web RUNNING pid 24830, uptime 0:00:04
frappe-bench-web:frappe-bench-node-socketio RUNNING pid 24831, uptime 0:00:04
frappe-bench-workers:frappe-bench-frappe-async-worker RUNNING pid 24827, uptime 0:00:04
frappe-bench-workers:frappe-bench-frappe-longjob-worker RUNNING pid 24828, uptime 0:00:04
frappe-bench-workers:frappe-bench-frappe-worker RUNNING pid 24829, uptime 0:00:04
frappe-bench-workers:frappe-bench-frappe-workerbeat RUNNING pid 24826, uptime 0:00:04

But the site still shows:

Internal Server Error

Check this one out…

I was able to relaunch supervisor, and no more problems. This happened to me after a restoring of the database. It worked, and ERPNext was up and running right after this!

UPDATE: Eventually had failures with this process, however it is worth a try.

https://github.com/Supervisor/supervisor/issues/480

1 Like

@Amalendu please don’t @-tag users for your issues. This is a voluntary forum and no one is obligated to answer you. Please pay someone if you need a guarantee

For the internal server error, try checking the gunicorn / nginx log to find out the trace in these files

/var/log/nginx/error.log
frappe-bench/logs/frappe.log

1 Like

Currently my solution is restart the whole system, then run service mysqld start use root user, then it will resume. And you can search add swap to Linux to add swap disk allocation for memory. As far as I know, the problem is database crash due to low memory. I believe erpnext memory management needs to improve.