{"id":551,"date":"2010-03-02T10:32:32","date_gmt":"2010-03-02T14:32:32","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=551"},"modified":"2013-03-20T08:42:23","modified_gmt":"2013-03-20T12:42:23","slug":"error-pleskfatalexception-unable-to-connect-to-database","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/error-pleskfatalexception-unable-to-connect-to-database","title":{"rendered":"PleskFatalException Unable to connect to database"},"content":{"rendered":"<p>On accessing the Plesk control panel you may receive the &#8220;PleskFatalException Unable to connect to database: Too many connections&#8221; error message and this is caused when the mysql connections on the server are exceeded than the specified value.<\/p>\n<blockquote>\n<pre>ERROR: PleskFatalException Unable to connect to database:\r\nmysql_connect() : Too many connections 0:\r\n\/usr\/local\/psa\/admin\/plib\/common_func.php3:190 psaerror (string\r\n'Unable to connect to database: mysql_connect() Too many connections')<\/pre>\n<\/blockquote>\n<p>The temporary solution is to restart the Mysql service, and the permanent solution is to increase the <strong>max_connections<\/strong> value in the mysql configuration.<\/p>\n<p>SSH to your server and restart the mysql service<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># \/etc\/init.d\/mysqld restart<\/span><\/pre>\n<\/blockquote>\n<p>If the problem is occurring quite frequently, you should increase the max_connections value in the my.cnf file. To check the existing max_connections value<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># mysqladmin variables -uadmin -p`cat \/etc\/psa\/.psa.shadow` \\<\/span>\r\n <span style=\"color: #0000ff;\">| grep max_connections<\/span><\/pre>\n<\/blockquote>\n<p>To increase the max_connections value, edit the \/etc\/my.cnf file<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># vi \/etc\/my.cnf<\/span><\/pre>\n<\/blockquote>\n<p>and set the following parameter<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\">max_connections = new_value<\/span><\/pre>\n<\/blockquote>\n<p>where, new_value should be the number higher than the existing mysql connections retrieved from the previous command.<\/p>\n<p>Save the file and restart the Mysql service for the changes to take affect:<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># \/etc\/init.d\/mysqld restart<\/span><\/pre>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>On accessing the Plesk control panel you may receive the &#8220;PleskFatalException Unable to connect to database: Too many connections&#8221; error message and this is caused when the mysql connections on the server are exceeded than the specified value.<\/p>\n<p>ERROR: PleskFatalException Unable to connect to database:<br \/>\nmysql_connect() : Too many connections 0:<br \/>\n\/usr\/local\/psa\/admin\/plib\/common_func.php3:190 psaerror (string<br \/>\n&#8216;Unable to connect to database: mysql_connect() Too many connections&#8217;)<\/p>\n<p>The temporary solution is to restart the Mysql service, and the permanent solution is to increase the max_connections value in the mysql configuration.<br \/>\nSSH to your server and restart the mysql [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[729,732,731,730],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/551"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=551"}],"version-history":[{"count":9,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/551\/revisions"}],"predecessor-version":[{"id":2179,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/551\/revisions\/2179"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}