getting too many connections errors (Mysql)
Category: Website
I have two heavily Mysql-driven websites (NewJerseyStage.com and ThePenguinRocks.com) and I'm running into this error all morning:
Warning: mysql_pconnect() [function.mysql-pconnect]: Too many connections in /home/newjer13/public_html/gw.inc.php on line 7
Unable to select database
What can I do to prevent this? I've just started promoting my websites, so traffic is going up. Is this a coding issue or could I possibly be hitting the maximum number of users at one time?
The sites have been working fine for years. These errors are just popping up now.
Warning: mysql_pconnect() [function.mysql-pconnect]: Too many connections in /home/newjer13/public_html/gw.inc.php on line 7
Unable to select database
What can I do to prevent this? I've just started promoting my websites, so traffic is going up. Is this a coding issue or could I possibly be hitting the maximum number of users at one time?
The sites have been working fine for years. These errors are just popping up now.
OTHER ANSWERS
|
0
|
Hello newjerseystage, Thank you for your question. As per your warning, you are using pconnect: mysql_pconnect It is not recommended to use persistent mysql connections, because it allows one visitor to make multiple connections. With a regular connect, it will process the connection, then close the connection once it finishes. Here is a link to an article here in our support center that explains persistent connections in better detail. It is likely that bots are crawling your websites, which is normal, and each time they hit a page, it makes a connection. With pconnect it does not close the previous connection, so when a bot hits every page without disconnecting it can use up your connections. If you have any further questions, feel free to post them below, or contact live Tech Support. They are available 24/7 via: Email: support@inmotionhosting.com Phone: 888-321-HOST (4678) 757-416-6575 (Intl.) & Chat (there is a link on the top right). Thank you, -John-Paul |
Like this Question?
Tweet
Latest Questions
If you need some help, submit your question to our Community!
We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)
Recent QuestionsNeed more Help?
Search
Ask the Community!
Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.
Current Customers
| Chat: | Click to Chat Now | E-mail: | support@InMotionHosting.com |
|---|---|---|---|
| Call: | 888-321-HOST (4678) | Ticket: | Submit a Support Ticket |


