NL_Johan_UK Posted April 28, 2003 Share Posted April 28, 2003 I suppose this is a luxury problem, it show increasing visitors BUT! My site is messed up... Warning: mysql_connect() [function.mysql-connect]: Too many connections MySQL Error : Connection Error Error Number: 0 etc.. What can I do to stop this? Use mysql_close()? It doesnt seem to get better, in fact non of the site appears when I add that in the last script that is being executed... Help is appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/410-too-many-connections/ Share on other sites More sharing options...
shivabharat Posted April 28, 2003 Share Posted April 28, 2003 Try to Increase the maximum connections in mysql by editing the httpd.conf Quote Link to comment https://forums.phpfreaks.com/topic/410-too-many-connections/#findComment-1370 Share on other sites More sharing options...
NL_Johan_UK Posted April 28, 2003 Author Share Posted April 28, 2003 I don\'t know how to get direct access to the server. I do everything through ftp and phpmyadmin. How do I access httpd.conf? Is there anything I can change in phpmyadmin? I have mysql_close(); under every page now but occasionally the error still shows up. When I do \"SHOW PROCESSLIST \" as a query in phpmyadmin I get a list of 16 sleeping threads. Some for as long as 23000 + seconds. Can I kill all them without harm? Now Im closing all connections none should stay sleeping should they? Quote Link to comment https://forums.phpfreaks.com/topic/410-too-many-connections/#findComment-1371 Share on other sites More sharing options...
shivabharat Posted April 28, 2003 Share Posted April 28, 2003 are using a remote server or do u have ur own server? Quote Link to comment https://forums.phpfreaks.com/topic/410-too-many-connections/#findComment-1372 Share on other sites More sharing options...
NL_Johan_UK Posted April 28, 2003 Author Share Posted April 28, 2003 got a hosting deal, so remote. Quote Link to comment https://forums.phpfreaks.com/topic/410-too-many-connections/#findComment-1373 Share on other sites More sharing options...
shivabharat Posted April 28, 2003 Share Posted April 28, 2003 Nothing can be done from ur side try to talk to ur host providers and see what they say? I don think u will have permission to edit the config file and change settings! Quote Link to comment https://forums.phpfreaks.com/topic/410-too-many-connections/#findComment-1374 Share on other sites More sharing options...
NL_Johan_UK Posted April 28, 2003 Author Share Posted April 28, 2003 But can I kill those seeminly pointless threads that are sleeping? Quote Link to comment https://forums.phpfreaks.com/topic/410-too-many-connections/#findComment-1375 Share on other sites More sharing options...
shivabharat Posted April 28, 2003 Share Posted April 28, 2003 I havent tried that out but the format is like u have to get the connection_id() and the issue a kill to do that. Try searching in mysql hompage may be u will get an idea Quote Link to comment https://forums.phpfreaks.com/topic/410-too-many-connections/#findComment-1376 Share on other sites More sharing options...
shivabharat Posted April 30, 2003 Share Posted April 30, 2003 http://www.mysql.com/documentation/mysql/b...any_connections GRANT priv_type [(column_list)] [, priv_type [(column_list)] ...] ON {tbl_name | * | *.* | db_name.*} TO user_name [iDENTIFIED BY [PASSWORD] \'password\'] [, user_name [iDENTIFIED BY \'password\'] ...] [REQUIRE NONE | [{SSL| X509}] [CIPHER cipher [AND]] [iSSUER issuer [AND]] [sUBJECT subject]] [WITH [GRANT OPTION | MAX_QUERIES_PER_HOUR # | MAX_UPDATES_PER_HOUR # | MAX_CONNECTIONS_PER_HOUR #]] Quote Link to comment https://forums.phpfreaks.com/topic/410-too-many-connections/#findComment-1399 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.