Hi, My web server uses apache. Site goes offline frequently, due to Mysql gives error of "Too many connections". I'm able to restart the mysql manually but everytime it is not possible to login to mysql... Is there any other solution?
Have you checked your logs or process list to see exactly what SQL queries are running that are running so slowly? That's going to be your first step in fixing it.
Check your my.cnf (mysql configuration) via SSH and change max_connections if so required. Alternatively, use caching to stop numerous requests from reaching your database.