Randomly getting an error when trying to go to my website

Connect with other users about what to run on your webhosting (and how to run it) here.
Post Reply
anthony726
New to forums
New to forums
Posts: 2
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sun Mar 27, 2016 1:05 pm

Randomly getting an error when trying to go to my website

Post by anthony726 »

I haven't changed anything with my site and all of a sudden when I tried to go to it I got the following error: Failed to connect to database:Too many connections(1040).

I don't know what I'm supposed to do. I'm the only one that has ever visited my site because it is still in testing. I don't see how there would be too many connections if I'm the only one connecting to it.
smeikle
Compulsive poster
Compulsive poster
Posts: 62
Joined: Sat Jul 24, 2010 9:22 pm

Re: Randomly getting an error when trying to go to my website

Post by smeikle »

Are you developing your own site, or using something else (ie. wordpress)?
anthony726
New to forums
New to forums
Posts: 2
Joined: Sun Mar 27, 2016 1:05 pm

Re: Randomly getting an error when trying to go to my website

Post by anthony726 »

Developing my own site
smeikle
Compulsive poster
Compulsive poster
Posts: 62
Joined: Sat Jul 24, 2010 9:22 pm

Re: Randomly getting an error when trying to go to my website

Post by smeikle »

You should log into your sql administration and check your setup to see how many connections you are allowing. If it is set to the amount you are expecting (and within the limits of the hosting plan) then you should double check your scripts to see if they are creating more than what you are expecting.
lithium720
A semi-regular
A semi-regular
Posts: 21
Joined: Mon Nov 18, 2013 10:17 am

Re: Randomly getting an error when trying to go to my website

Post by lithium720 »

Too many connections may be an indication that you are not closing your MySQL sessions when the page is done loading.
User avatar
Edge100x
Founder
Founder
Posts: 12945
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Randomly getting an error when trying to go to my website

Post by Edge100x »

Usually this message means that you have a script that is stalling -- taking a long time to execute, and possibly never closing at all. This might happen if it has an internal bug/design flaw, or if it is waiting on an external resource that is not available, for instance.
Post Reply