In The Name of Allah the most Gracious the most Merciful
I faced all of these errors in all of my websites and in every time I search for a solutions I found nothing work to solve these problems. And I lost a lot of time in fixing these errors by trying many things till I found the errors solutions.
Don’t try to contact your host because it’s not the cause of the errors
A script is not closing the MySQL connection after accessing the database. In WordPress, such chances are less, however if there is an error in the scripting of a plugin or theme which you’re using, then the MySQL connection won’t close after querying the database. Hence, please make sure that you close the connection immediately after accessing the database using mysql_close() command from your scripts.
First I would like to start with the 500 internal server error, cause it’s the first error I faced in the first wordpress website I had.