View Full Version : Too many connections MYSQL
jpietrowiak
02-08-2011, 10:01 PM
Hello,
I am having anywhere from 1 to 3 a day where my server bombs out for a few minutes. My site seems slow sometimes as well. Started a couple weeks ago. I contacted my host they reset the server but didn't do any good. The file that each error references changes all the time. Though I do see more external.php RSS files for about 1 out of every 5. Any ideas on how to figure out what is going on.
mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Too many connections ......./includes/class_core.php on line 311
It also says I have alot of guests. How many is to many and would this cause it? I don't know if I really believe there are that many guests, so could it be search engines causing server load?
Thanks to anyone that can shed some light or help point me in the right direction.
Jamey
KevinL
02-08-2011, 11:01 PM
Either upgrade to a VPS or a better shared hosting environment.
I would say another shared environment depending on how busy your actual site is.
Can we have a link to the site?
jpietrowiak
02-08-2011, 11:20 PM
Sorry here is the vbulletin URL for the CNC Professional Forum (http://cnc-professional-forum.com/)
I tried a VPS once when it was hosted at Dreamhost. I had to keep sliding the slider for memory and it was at $50 a month and still was not enough. I requested to go back to shared hosting since I did not have any problems there and it was alot less. I only upgraded at the time because I wanted it to be as fast as it could be. Didn't think it would cost that much. Now I am on Gatorhost. Have not had any problems until the last 3 weeks. No major upgrades either, so its kindof odd. Just wondering if it was hacked or something. Also I do not archive any old posts so would this also be a possible cause?
benstillman
02-11-2011, 03:07 PM
What is max_connections set at? Sounds like it's probably too low.
jpietrowiak
02-11-2011, 05:02 PM
Thanks, Where would I find that? I tried looking through my control panel but can't seem to find it. I looked in the PHP.ini EZ config which is where I thought it should be.
Also I noticed a setting "Add No-Cache HTTP Headers" and I have this set to yes. Would this be an option to maybe help and if so would that cause my visitors not to see new posts made to threads if they viewed that thread previously?
Videx
02-11-2011, 11:52 PM
I believe Hostgator has a fixed max 25 mysql connections for shared hosting. That should be okay for up to maybe 75 concurrent users depending what they're doing.
BTW, I too have been seeing "Guest attacks" recently, with 10X the normal number of them, all from different places doing different things.
Boofo
02-12-2011, 01:18 AM
Hostgator won't up it from 25 on shared hosting. They blame it on vb.
jpietrowiak
02-14-2011, 06:07 PM
I wonder what is going on with all the guest attacks, thats interesting! Still have not gotten it figured out. I tried a few different things in Vb over the past few days but nothing made a difference. I am trying to turn off the "Add No-Cache HTTP Headers" today to see what happens if anything. I am shooting in the wind right now.
Videx
02-14-2011, 06:15 PM
I suppose we're not off topic here, because clearly an overload of guests would throw him over the 25 mysql limit.
The only odd thing I saw in my referrers was 100X the number from mikle.com (feedwind) (about 30,000 to the next one, Facebook with about 400). So, shooting in the dark as well, I've excised my feedwind blocks; we'll see how it goes.
jpietrowiak
02-17-2011, 01:09 AM
Well after turning off the "Add No-Cache HTTP Headers" I still am getting about 3 time outs today. So I am at a loss on what else to do at this time. Anyone have any more ideas?
Zachariah
02-17-2011, 01:59 AM
<a href="https://vborg.vbsupport.ru/showthread.php?t=204842" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=204842</a>
jpietrowiak
02-17-2011, 02:35 AM
Hi Zachariah,
Thanks for the info Zachariah. I just implemented it and the forum is now very speedy. Definitely a noticeable improvement. Hopefully this will take care of it. I will let you all know after a couple days.
Thanks
Videx
02-17-2011, 03:08 AM
Wow, talk about a clear violation. Your host isn't limiting you to 25 connections per user, but 25 connections per account. You may be able to fool them for a while, I don't know. But I do know that instead of trying to solve the problem you're just trying to implement a clever (but illegal) workaround.
jpietrowiak
02-17-2011, 04:15 PM
Violation probably is not a good thing. I did implement it but received two errors over the night, so it really did not fix the problem though it does really seem faster.
One thing I forgot about was that I did have to increase my bandwidth setting in the reseller account last month as well. So there was definitely a spike in traffic or something.
So now not sure what to do? Is there a setting or script to slow down search index bots? I thought I remember seeing something on this. Though I do not know if thats a good idea since it could hurt SEO.
jpietrowiak
02-18-2011, 05:12 PM
ok its been a whole day and a half and no errors. Its been averaging 3 a day for past couple weeks. The last thing I did was Moderated link backs and I deleted 38 pages of them whether right or wrong. The best I could find is that you should have at most 10 websites in there. Think this would really have anything to do with it or is this just coincidence?
Videx
02-18-2011, 05:50 PM
I have no idea what a "moderated link back" is. Something to do with an add-on you have? Seems to me if you're clamoring for SEO then you sure don't want to go disabling linkbacks. The question may be better asked in an SEO thread.
lee246
02-18-2011, 06:37 PM
I'd just like to add I'm with hostgator and have suffered from this problem for roughly a year now. They keep taking my site down, then putting it back up after I have carried out optimisations they request.
I'm now looking into upgrading to a VPS.
CloudWolf
03-25-2011, 09:52 PM
Yep! I have the same problem, also with Hostgator :)
I'd say its down to too many guest connections from bots. Normally, my forum ambles along with perhaps 5 connections at the most. Then all of a sudden the connections will spike causing the site to crash.
As Hostgator said, it seems to only way for us to fix this problem is to upgrade our packages to a Dedicated Server :(
After talking to one of their sales team, you can get a dedicated server for just under $20/month if you don't want to use their cPanel. ($45 with the cPanel).
Once I leave university and get myself a job, this is probably the route I'll be taking.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.