Unable to solve Internal Server Error in erpnext

I just restarted the server and this error pops out.

Do you suggest to reinstall in this case?

@root13F

Also will reinstalling mariadb-server result in delete of data ?

probably let us not take that risk. I shouldn’t have suggested that.

Then what are suggestions to resolve this issue?

one thing what is this machine’s configuration ?

Let me attach htop picture.!

okay one thread it was suggested that you restart the server i.e. the machine

Already did couple of times.

Please note that I have installed this on my personal laptop with dual windows.

It was working fine last time I logged in.

Yes this is going in circles. Let me see if I can find something

Thanks brother. :slight_smile:

Please post any solution here if you find any thing relevant.

1 Like

@root13F, Just fyi, when I type this command:
sudo systemctl status mariadb.service

its popping out the following error.

Aug 09 17:11:29 ak systemd[1]: Starting MariaDB 10.2.16 database server…
Aug 09 17:11:30 ak mysqld[11324]: 2018-08-09 17:11:30 139697069971648 [Note] /usr/sbin/mysqld (mysqld 10.2.16-MariaDB-10.2.16+maria~xenial-log)
Aug 09 17:11:30 ak mysqld[11324]: 2018-08-09 17:11:30 139697069971648 [Warning] Could not increase number of max_open_files to more than 16364
Aug 09 17:11:30 ak mysqld[11324]: 2018-08-09 17:11:30 139697069971648 [Warning] Changed limits: max_open_files: 16364 max_connections: 500 (wa
Aug 09 17:11:33 ak systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Aug 09 17:11:33 ak systemd[1]: Failed to start MariaDB 10.2.16 database server.
Aug 09 17:11:33 ak systemd[1]: mariadb.service: Unit entered failed state.
Aug 09 17:11:33 ak systemd[1]: mariadb.service: Failed with result ‘exit-code’.

I found the solution and would like to share it the community.

First I have removed the warning of max_open_files
by editing file using this command

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

Changed LimitNOFILE to 40000 from 16364

#LimitNOFILE=16364
LimitNOFILE=40000

Then I googled and found the same problem on this thread

Repeated the same procedure
checked mysql-error.log file and the error was same.

Then entered 2 commands and my app was up and functional

mysqld --tc-heuristic-recover=ROLLBACK
service mysql start
10 Likes