Internal Server Error / Imposible fix

Hi everyone!!! i need a solution for the next issue

I try this soutions:

try this

bench restart
bench migrate
bench start

try this…
bench update --reset

i get this…

your database or site1.local are corrupt

try this …

sudo nano /etc/systemd/system/mysqld.service

change LimitNoFile


sudo mysql --tc-heuristic-recover=ROLLBACK
sudo service mysql start

simply doesn’t work.

the service of mysql is dead!

after search try this:

service mysqld status

systemctl start mariadb.service

systemctl enable mariadb.service

and don’t work again!

in this point i thnk the best soultion are a full backup and try this

  • mysqldump -u username -p database_name > data-dump.sql

and nothing!!!

please i need your help!!!


Is this a new installation or one that was working and then the problem?

What does service mariadb status return?

Hi, thanks for the answer!

Yes is a completly functional and estable working!!! But … when an employee was entering a sales invoice, the electricity was cut and when starting the virtual machine it no longer worked.

This is the output from mariadb status

Restart SQL

And then check if site is in maintenance mode

Tnks!!! this is the result!!

1 Like

If you have a backup made before the electrical failure, try restoring that.

Thanks!!! No i don’t have a backup, because was the first day in use de software. implementation day 1

this is sad!

Best to start again, and invest in uninterruptible power supply for server. It will take less time to re-enter data than to try to fix corrupted database IMO.

thank you, you are absolutely right.

I managed to solve the problem

  • Connect to the server using SSH.

  • Stop the affected MySQL service and the service plesk-web-socket to prevent it from attempting to start MySQL:

  • service mysql stop && service plesk-web-socket stop

  • Back up all the MySQL data storage files. By default, they are located in the directory /var/lib/mysql/ .For example:

  • cp -a /var/lib/mysql /root/mysql_backup

  • Add the parameter innodb_force_recovery to the section [mysqld] of the MySQL configuration file. This option allows starting MySQL service in the recovery mode and try creating dumps of databases.For example:

  • vi /etc/my.cnf
    innodb_force_recovery = 2

  • Start the MySQL service.

  • If the service fails to start, set the value of the parameter innodb_force_recovery to a greater value and try starting MySQL again.
    Value of the parameter innodb_force_recovery can be from 1 to 6.

Warning: Only set innodb_force_recovery to a value greater than 0 in an emergency situation, so that you can start InnoDB and dump databases. Values of 4 or greater can permanently corrupt data files. Therefore, increase this value incrementally, as necessary. See more details in the official MySQL Documentation.

1 Like

Very nicely done! I was concerned that the data files were corrupted beyond repair as a result of power failure. The approach you took may have been time consuming , but the knowledge gained may be useful in the future. Don’t forget to save some $$ for a UPS :slight_smile: .

I already bought it!