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.
Randomly getting an error when trying to go to my website
-
- New to forums
- Posts: 2
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Sun Mar 27, 2016 1:05 pm
Re: Randomly getting an error when trying to go to my website
Are you developing your own site, or using something else (ie. wordpress)?
-
- 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
Developing my own site
Re: Randomly getting an error when trying to go to my website
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.
-
- A semi-regular
- Posts: 23
- Joined: Mon Nov 18, 2013 10:17 am
Re: Randomly getting an error when trying to go to my website
Too many connections may be an indication that you are not closing your MySQL sessions when the page is done loading.
Re: Randomly getting an error when trying to go to my website
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.