![]() |
"Too many connections" error?
Hi,
Today I receive an error message as below: Database error in vBulletin : mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Too many connections /xxx/htdocs/includes/class_core.php on line 317 MySQL Error : Error Number : Request Date : Thursday, November 13th 2014 @ 04:32:30 AM Error Date : Thursday, November 13th 2014 @ 04:32:30 AM Script : http://forums.mysite.com/search.php?search_type=1 Referrer : IP Address : ##.##.###.## Username : Classname : vB_Database MySQL Version : How to solve this problem? Thanks |
<a href="http://dev.mysql.com/doc/refman/5.5/en/too-many-connections.html" target="_blank">http://dev.mysql.com/doc/refman/5.5/...nnections.html</a>
Increase the max_connections variable of MySQL. |
I agree with Dave. Change the setting in the mysql.cnf but also make sure you limit searches because these are very intensive and this is what is causing your issue. Only allow them 30 seconds apart and lower the max output as well.
|
Thank you very much. I think the error is caused by DOS attacks. So how to prevent this? How to allow the search 30 seconds apart and lower the max output? Should I modify in vBulltin or in MySQL settings?
|
What makes you think it is a Dos attack?
|
Quote:
I doubt it is ddos but you can check server logs to be sure. |
Because in the past, I also encounter similar error messages and sometimes there will be about thousands of such messages, which makes me believe that is a DOS attack.
|
Well check your server logs and see. :)
|
Now today I receive 39 "Too many connections" errors, as below:
Database error in vBulletin : mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Too many connections /var/www/vhost/forums.datanumen.com/htdocs/includes/class_core.php on line 317 MySQL Error : Error Number : Request Date : Friday, November 14th 2014 @ 05:36:50 AM Error Date : Friday, November 14th 2014 @ 05:36:50 AM Script : http://forums.datanumen.com/private....=newpm&u=15515 Referrer : IP Address : 157.55.39.30 Username : Classname : vB_Database MySQL Version : and Database error in vBulletin : mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Too many connections /var/www/vhost/forums.datanumen.com/htdocs/includes/class_core.php on line 317 MySQL Error : Error Number : Request Date : Friday, November 14th 2014 @ 05:42:33 AM Error Date : Friday, November 14th 2014 @ 05:42:34 AM Script : http://forums.datanumen.com/entry.ph...ods-Girlfriend Referrer : IP Address : 199.58.86.206 Username : Classname : vB_Database MySQL Version : The error body will be different a little, but all said "Too many connections" It seems that the attacker is try to using different way to attack my server. Is there a way to prevent this, other than just increase the max connection for My SQL? Thanks |
Getting a better host if the one you have can't handle what it has now
|
What server type is this, shared, VPS or dedicated?
What is your max_connections set to? I see this is a new forum, and there is basically nothing on it, so you should not get overloaded. Perhaps read this post, http://ozzmodz.com/showthread.php/50...g-Spam-Is-Over and install the Ban Spiders by User Agent and Hostname or Useragent Registration Ban modifications, to block bad bots and spiders. |
Check the access.log to be entirely sure it's a DoS attack.
Also it's odd that your web-server doesn't crash, but your MySQL server does. It's usually the other way around. If you're entirely sure it's a DoS attack, you can do several things: 1) Find which IP is doing it and block the IP. A DoS attack is 1 IP, a DDoS attack is sent from a bunch of infected hosts. 2) Go to a host which offers DDoS protection. (Expensive) 3) Use Cloudflare and enable "I'm under attack mode" at the security settings. This should eliminate most attacks. Be sure that you only allow connections to your webs-server from Cloudflare its IP's if you do this. |
I doubt it is a dos attack hitting the search.php page.
Running a search will require resources and if maxed out, any extra connection will give the max connection error. If your site is even just fairly busy you can get hundreds of these errors once you peak. Does this happen at the same daily? maybe your site is running a cron task at that time or doing a back up which is also using resources. If you are on a shared host your host will most likely spot a real ddos attack long before you will. If on a dedicated that is a different problem all together. |
All times are GMT. The time now is 05:54 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|