Corrupted Database file?

Hello
I had a problem where I would get

  1. Ocassional Internal Server Error

  2. One site could be accessed, another could not be accessed (same bench): got error Internal server error

  3. Later after some configuration changes, the second site also ran but could not login [showed: “Something went wrong” error] (checked browser console: got error : Internal server error)

I made a complete server reinstall, and fresh installation of bench, frappe, erpnext and all apps. Newly created sites were accessible.

Then I restored the previous backups.

All of a sudden, I can’t access my site. (both of them).

Could the database file be corrupted ?

Update:

Upon restarting supervisor a bunch of times and bench restart 2/3 times, one of the sites started to run, but I am getting a bunch of 502 error on some XHRs


Second Update: Upon refresh, (no commands hit in terminal) browser goes : Internal server error.

Hi,

Please check the log in

/var/log/mysql/error.log

for more details.

Thanks,

Divyesh Mangroliya

I am getting a bunch of this kind of error:

2024/09/25 19:07:48 [error] 51257:51257: *1 connect() failed (111: Unknown error) while connecting to upstream, client: my ip, server: erp.example.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "107.000.000.000"

Hi,

This is NGINX log, please check the error log for mysql.

Thanks,

Divyesh Mangroliya

There is no error.log file.
/Var/log/mysql/ is empty.

The other place to check would be the various log files in your bench/logs directory.

I got this in frappe.log.

2024-09-25 20:19:37,124 ERROR frappe New Exception collected in error log
Site: site2.example.com
Form Dict: {}
2024-09-25 20:19:51,484 ERROR frappe New Exception collected in error log
Site: site1.example.com
Form Dict: {}

Also this:

2024-09-26 09:44:40,905 ERROR frappe New Exception collected in error log
Site: site2.example.com
Form Dict: {'redirect-to': '/app/private/home'}

The specific Exception should be logged somewhere, though I’m not fully clear about what goes where exactly. Is there anything else being generated in any of the logs at roughly the same time?

This looks like a Frappe problem, not a database problem.

I am currently checking other logs.
The problem started only after db restore. And since it was a fresh installation, I’d assume it could not be Frappe.
But again, I tried to restore the site on a trial F cloud. It works over there. I am not sure what might be the problem.

Hi,

Download the backup from frappecloud and restore it to your local server and check it is working?

Thanks,

Divyesh Mangroliya

Hi,

Also, check the Mariadb version in your local system. Latest version of MariaDB is not yet tested with Frappe.

Thanks,

Divyesh Mangroliya

mariadb -V returns:

mariadb  Ver 15.1 Distrib 10.6.18-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper