Jump to content

Mysql Warning & Bug


bizbot
 Share

Recommended Posts

I have a webpage in php - you can add or delete items for sale from the admin page. I have never had any problems with it before but I recently added and deleted some items.

 

The website works but if you use it for awhile - I get this error message on all the webpages:

 

Warning: mysql_pconnect() [function.mysql-pconnect]: User success_DNPage has already more than 'max_user_connections' active connections in /home/success/public_html/draft/Connections/domains.php on line 10

User success_DNPage has already more than 'max_user_connections' active connections

 

There is a link in the error message and when you click on it says: 404

 

If you wait a few minutes the website works again but only for awhile then you get the error message again.

 

Can somebody help? Do you need more info?

 

Thanks

Edited by bizbot
Link to comment
Share on other sites

Andy, I had a programmer look at the site and he said the following:

 

I don't think the solution is to just change the connection type. mysql_pconnect()

is OK, as it uses persistent connections, so a separate Mysql connection is not needed to be

created for every page.

 

 

From the error on your page "User success_DNPage has already more than 'max_user_connections'

active connections" it looks like that is exactly the problem on your site.

There are not enough available connections, so switching to

mysql_connect() would make matters even worse. The solution here is to

ask your host or your system admin to tweak the Mysql config file, and

especially increase the value for these 2: "max_connections" and

"max_user_connections".

 

Does this seem correct and do I need to open a support ticket?

 

Thanks!

Edited by bizbot
Link to comment
Share on other sites

Whilst persistent connections eleminate the overheads during creation of new connections, mysql takes relatively short time for creating new connections and often the benefit of using persistent connections is not noticeable. Also, considering the drawbacks of using persistent connections its advantages are negligible. You may have also have to check your code and verify that all mysql sesstions are getting closed after the script execution.

 

Is there any specific reason your programmer wants to use persistent connections ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...