LATH Posted February 23, 2007 Share Posted February 23, 2007 I'm working with a script of a 3rd party product that has no support and have run into an issue with MySql connections...they hit the max intermittently. This is the typical error message: PHP Warning: mysql_pconnect() [<a href='function.mysql-pconnect'>function.mysql-pconnect</a>]: User xxxxx has already more than 'max_user_connections' active connections in /home/xxxxx/public_html/auction/includes/config.inc.php on line 113 According to the online docs mysql_pconnect() "Establishes a persistent connection to a MySQL server". I've only used mysql_connect(). The docs also say "mysql_close() will not close links established by mysql_pconnect()". The docs also give this warning: "Using persistent connections can require a bit of tuning of your Apache and MySQL configurations to ensure that you do not exceed the number of connections allowed by MySQL." Has anyone had experience with this issue? Quote Link to comment Share on other sites More sharing options...
TCH-Andy Posted February 23, 2007 Share Posted February 23, 2007 change the connection from mysql_pconnect to mysql_connect (without the p) and then things should be much better. It's best not to use persistent connections Quote Link to comment Share on other sites More sharing options...
LATH Posted February 23, 2007 Author Share Posted February 23, 2007 Thanks for the reply. That is what I was thinking, but I was alarmed at the prospects of a lot of code changes (someone else's code to boot). Oh well...thanks for the confirming opinion. Quote Link to comment Share on other sites More sharing options...
daspyda Posted April 10, 2007 Share Posted April 10, 2007 change the connection from mysql_pconnect to mysql_connect (without the p) and then things should be much better. It's best not to use persistent connections I am having the same issue.... How may I accomplish your suggestion? I use phpBB Don spyderchat.com Quote Link to comment 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.