The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Too many connections
Recently I have started getting this database error email. It starts at 10:30PM and last about 20-30 minutes after which all is normal.
This is the first of the error: Database error in vBulletin : mysql_connect(): Too many connections /hsphere/local/home/xxxxxxxx/forum.autocareforum.com/includes/class_core.php on line 311 The ip is from China 180.76.5.64 Night before last the host terminated service and this was one of the issues: ->Query summary Time: 24% (3696 sec) Amount: 20% (31 queries) Rows Examined/Sent: 557 / 502 Avg. Query Exec/Lock Time: 119 / 43 sec. Used databases: [pitzerw_vb] Query example: use pitzerw_vb; SELECT * FROM datastore WHERE title IN ('','options','bitfields','attachmentcache','forum cache','usergroupcache','style cache','languagecache','products','pluginlist','cr on','profilefield','loadcache' ,'noticecache','bbcodecache'); |id table rows Extra |1 datastore 15 Using where They turned it back on 7 hours later and suggested that it was an optimization issue, so I ran repair and optimization and it said all was fine. I am running 3.8.4 patch 2 Thanks |
#2
|
||||
|
||||
"Too many connections" means the server has maxed out the number of MySQL connections it allows. You can try turning persistent connections off by adding this to your config.php:
PHP Code:
|
#3
|
|||
|
|||
Thanks, I'll give it a try.
--------------- Added [DATE]1325485530[/DATE] at [TIME]1325485530[/TIME] --------------- Lynne, That didn't solve it. What's with the "attack" at 10:18 PST each day. Any other options? Thanks --------------- Added [DATE]1325530072[/DATE] at [TIME]1325530072[/TIME] --------------- Is there a way to put their IP somewhere that would stop them on the "outside"? |
#4
|
|||
|
|||
This is what I got from my host:
Our administration team is monitoring network 24/7 and we block external addresses if we detect abusive activity however if someone is overloading your site using some script from your side which generates too many SQL queries it can be very hard to detect because that address does not generate too much traffic. We recommend rechecking your scripts to prevent that from your side. Our administration team told us that it is possible that someone is abusing your application if the problem occurs at exact same time every day but we don't have any evidence of that, please check your HTTP connection logs available inside /logs/ folder in your hosting plan. You can add any address to deny list in .htaccess file, here are some examples: http://www.htaccess-guide.com/deny-v...by-ip-address/ I added this to my root directory of the forum: order allow,deny deny from 213.186.12. deny from 180.76.6. allow from all Do you think that this is the solution or a possible solution? Thanks |
#5
|
||||
|
||||
I don't know if that will work (and actually doubt it). I am guessing the host has the max_connections set low for you - did you ask them what it is set to?
|
#6
|
|||
|
|||
Update, well, it happened again but the 2 IPs that I put in the .htaccess were not the same, of course, there were about 10 from the normal unwanted places. The host says" that this is from a "script" on my end". Any idea what they are talking about, or a solution.
I asked about the number of connections, no answer yet. |
#7
|
||||
|
||||
Of course it's from a script. If you had no pages on your site, then you would never get any errors!
Like I asked before, what do they have your max_connections set to? You may want to see this - List of questions a user should ask a new host |
#8
|
|||
|
|||
I'm still waiting for their answer on the number of connections. My question is if this "too many connections" issue cause the long Query times, which is what they terminated service over?
Is there some way to automatically turn off my site from 10:18 to 10:40 or would that really help. Would they just adjust their "script". Thanks |
#9
|
||||
|
||||
You may want to see if they have any sort of caching available to you. You could use the vbulletin datastore_cache (set in the config.php file) and see if that helps.
|
#10
|
|||
|
|||
Thanks. Can you give me the code that would go in the config file? When I put something in the config file, do I need to cycle/reboot something or is it read constantly?
Do you think that these "too many connection" events is causing the Query time issues? Bill |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|