Someone on my shared server is hosing my site. I know my site isn't sucking all the bandwith. I checked my status logs. Earlier I couldn't even access my site, now I get the error "mysql_pconnect(): Too many connections". Please boot these bandwith-sucking loozers.
mysql_pconnect(): Too many connections
Collapse
X
-
No one should be using mysql_pconnect() on a shared server. If you can't connect to your database mysql_pconnect() could be the reason.
[ edit - to correct double negative ]Last edited by Buddha; 10-01-2004, 07:11 AM."Whatcha mean I shouldn't be rude to my clients?! If you want polite then there will be a substantial fee increase." - Buddha -
I just changed the mysql_connect to mysql_pconnect to fix the broken server in the first place. Now my other site www.scsclub.com is dead and won't even resolve. If I could FTP to the site I'd change it back.Last edited by AndrewT; 10-01-2004, 08:12 AM.Comment
-
n8f8, just so you know why mysql_pconnect(); is bad, here's an excert from the PHP manual, which can be viewed here: http://php.net/mysql_pconnect
The connection to the SQL server will not be closed when the execution of the script ends. Instead, the link will remain open for future use (mysql_close() will not close links established by mysql_pconnect()).
So why is this bad on a shared server? Another excert, this time from an article on http://www.zend.com
The mysql_pconnect() function was designed to provide a mechanism for reducing the cost of establishing and closing connections to the MySQL server. Unfortunately, due to an interaction between the architecture of the Apache server and the architecture of PHP, high traffic on a site that used pconnects could quickly clog up the MySQL server with many unused connections that could prevent many of the active connections from accessing the database.
I hope this helps clarify anything that you may not have understood. If you need to ask any questions about the function, fire away
David-----
Do you fear the obsolescence of the metanarrative apparatus of legitimation?Comment
Comment