I searched the tutorials forum and couldn't find a solution to this problem...sorry if it is somewhere and I missed it.
My website goes down at least 3-4 times a week and I get this error when I go to either the site or the forum:
Main Site:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server in /home/chevell1/public_html/wb/framework/class.database.php on line 61
Can't connect to local MySQL server - Too Many Connections
Forum:
Database connection error!
A connection to the Database could not be established.
Please check your username, password, database name and host.
Also make sure config.php is rightly configured!
my website is ChevelleOnline.net
If anyone could help me identify and fix this problem i would be greatful!
MySQL Too many connections
Moderator: General Moderators
Re: MySQL Too many connections
the settings you want to adjust are located in a file called my.cnf, if you google about it you will find out a wealth of info about your problem.
Re: MySQL Too many connections
There must be something wrong with your code or with the database. Are you in a share hosting? Are you sure you connect only once per page to your db?
Re: MySQL Too many connections
Well......I did some more research and found this:
Drop the persistent connections. That should stop the "too many
connections" errors.
So, I had a chat with one of the Bluehost workers (apparently they don't let customers drop the persistent connections which is already a sign that they are a bad host)
PM [7:11:09 PM]: my site is constantly crashing with a "too many connections" error.....and i was researching and someone said to just drop the persistent connections...
JMiller [7:13:00 PM]: Sorry, but that is not doable on our servers.
PM [7:15:19 PM]: so......can't anyone help me with this problem.....i've been back and forth for literally months with your company about this problem....it's never ending.....isn't there some type of way to fix this....
JMiller [7:16:11 PM]: If you are getting that error a lot it may be time to upgrade to a dedicated server, which we unfortunately don't provide.
....So now I'm unsure as to what to do....I really can't just transfer to a new host easily....Is this what I would've wanted to do in order to get rid of the "too many connections error"? Is there any other way to fix it if so?
Drop the persistent connections. That should stop the "too many
connections" errors.
So, I had a chat with one of the Bluehost workers (apparently they don't let customers drop the persistent connections which is already a sign that they are a bad host)
PM [7:11:09 PM]: my site is constantly crashing with a "too many connections" error.....and i was researching and someone said to just drop the persistent connections...
JMiller [7:13:00 PM]: Sorry, but that is not doable on our servers.
PM [7:15:19 PM]: so......can't anyone help me with this problem.....i've been back and forth for literally months with your company about this problem....it's never ending.....isn't there some type of way to fix this....
JMiller [7:16:11 PM]: If you are getting that error a lot it may be time to upgrade to a dedicated server, which we unfortunately don't provide.
....So now I'm unsure as to what to do....I really can't just transfer to a new host easily....Is this what I would've wanted to do in order to get rid of the "too many connections error"? Is there any other way to fix it if so?
Re: MySQL Too many connections
dont use persistent connections. for a normal site you will never see a performance hit.