Internal Server Error after sudo supervisorctl restart all

I have tried all possible solutions related to this topics, but unfortunately, I cannot find the solution in my case. most of all the services are Active and running well, I executed the following commands to check,

sudo service mariadb status 
sudo service mysql status 
sudo service nginx status
redis-cli ping

No error in response to all the above commands and shows running in green.

I reinstalled the Nginx server using following commands

dpkg --get-selections | grep nginx
sudo apt --purge remove nginx -y
sudo apt --purge remove nginx-common -y
sudo apt --purge remove nginx-core -y
sudo apt install nginx -y
sudo service nginx status

nginx removed and reinstalled I can access other sides.

tried bench commands to refresh using the following command

bench migrate
bench --site all clear-cache
sudo supervisorctl reload
sudo service nginx restart

all above result was normal and no error.

additionally, checked the database name+pwd in the site .config file which is fine to access the database from the command prompt it returns SQL Queries results perfectly.

but still getting the same error: Internal Server Error. :frowning:

seems like everything is working well but the website is giving this error. I cannot understand the reason not sure if the files get corrupted while restarting the services or what else to do? How can I resolve this error please?

image

Hi,

It may help to say the operating environment, versions of Frappe and any apps, and whether this is a new installation or one that was working and the problem arose after some changes.

Does service supervisorctl status look ok?

1 Like

thank you @smino for the reply,

I tried and got the below error.

$ sudo service supervisorctl status
Unit supervisorctl.service could not be found.

Since I am using Ubuntu OS and then I executed the following command to check and got a successful response as RUNNING.

$ sudo supervisorctl status

frappe-bench-redis:frappe-bench-redis-cache               RUNNING   pid 17295, uptime 0:13:04
frappe-bench-redis:frappe-bench-redis-queue               RUNNING   pid 17296, uptime 0:13:04
frappe-bench-web:frappe-bench-frappe-web                  RUNNING   pid 17941, uptime 0:12:02
frappe-bench-web:frappe-bench-node-socketio               RUNNING   pid 17942, uptime 0:12:02
frappe-bench-workers:frappe-bench-frappe-long-worker-0    RUNNING   pid 17301, uptime 0:13:04
frappe-bench-workers:frappe-bench-frappe-schedule         RUNNING   pid 17299, uptime 0:13:04
frappe-bench-workers:frappe-bench-frappe-short-worker-0   RUNNING   pid 17300, uptime 0:13:04

but still the site is running with INTERNAL SERVER ERROR :frowning:

Now when trying to migrate the site it’s getting stuck in the DB connection. shows “Connected to site DB” but not moving on, after long waiting time, I broke the process and “bench migrate” is not finishing. seems like DB connection problem but not sure

Site error is still same Internal Server Error

Does bench ---site (sitename) mariadb connect?