News:

Wondering if this will always be free?  See why free is better.

Main Menu

Connection Problems

Started by EmsoffLambs, June 30, 2015, 07:55:46 PM

Previous topic - Next topic

EmsoffLambs

When I try to open my forum, I get this message:

Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.


I contacted my host and this is what they told me:

We are sorry for the inconvenience caused to you. The maximum number of concurrent MySQL connections per user is 10. The limits are based per database login, not Control Panel log in or MySQL CNAME. It's solely based on database login i.e. if you have one username connecting to 50 databases, there will be 50 connections, per database. You should use mysql_close () to close a normal connection at the end of the script or else the session with the database will be kept open. If you are using mysql_pconnect(), then such persistent connections are closed when the script finishes.

For more information, please refer the URL: http://www.thoughtlabs.com/2008/02/18/dealing-with-mysql-too-many-connections-error/ .


So where do I make this change? I am really NOT a strong coder. On what file and where on it do I change the code? Thanks so much!

Bigguy


Illori

who is your host? it sounds like you have an oversold host.

EmsoffLambs


Illori

yep they are oversold... http://www.simplemachines.org/community/index.php?topic=117303.0 and if you want to find a new host i would recommend checking out those listed here http://www.simplemachines.org/community/index.php?board=155.0

EmsoffLambs

I would really prefer not to have to change hosts. I've got dozens of sites hosted with Netfirms. Is there any way to resolve this issue without changing hosts?

Illori

move to a VPS with them that you most likely dont need and pay more money?

Sir Osis of Liver

How many active databases do you have?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

EmsoffLambs


EmsoffLambs

Here is the second reply from my host:

"Too Many Connections can be caused by either a lot of simultaneous connections or by old connections not being released soon enough. There are some simple changes you can make to your PHP code and your MySQL settings to prevent both. You can search in Google and refer certain articles to learn about necessary changes that can be performed from your end.

If you are using pconnect() function to connect database which will not close the connection once the script connects to the database. This will exceeded the concurrent MySQL connections on shared hosting. Please modify your script/application so that the connection is closed (just connect()) after it is established or after the query is run."


I did the "repair_settings.php" and set connections to standard, but it's still not working. :(

Illori

they are feeding you "answers" that they hope will make you feel like they are solving your problem, but in the end will not. they will over time push you to a higher paying hosting plan or you will go find a non-oversold host.

Sir Osis of Liver

I don't believe SMF uses any persistent db connections.  Have you checked your error log?  I've worked on forums that were suspended by host because they were logging huge numbers of errors due to crappy mod installations.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

EmsoffLambs

How do I check my error logs?

Steve

Admin -> Maintenance -> Logs -> Error Log
DO NOT pm me for support!

EmsoffLambs

I cannot get into admin because the forum won't open at all.

If all my other two dozen sites in the hosting account work, as well as the site home, but just not the forum, is that an overselling issue?

I will change hosts if I have to though. What is the best host to go with? It's a relatively small forum. A couple hundred members, but only a handful that are ever on it at the same time. Less than a dozen.

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters


Sir Osis of Liver

Is your host blocking the forum?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Going offline soon.  This is not an overselling issue, everything else on the website works fine.  If you can pm temporary ftp access (ftp server, username, password), will have a look tomorrow.  Would help if you could take a look at smf_log_errors in your database, see what's in it.

 

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Illori

Quote from: EmsoffLambs on July 01, 2015, 11:10:05 PM
If all my other two dozen sites in the hosting account work, as well as the site home, but just not the forum, is that an overselling issue?

possibly, there are many symptoms of using an over sold host. currently your forum is not loading at all. i wonder if your host has modified something that is making it load a blank white page. as i said before if you want to look for a new host check our paid hosting board, none of those hosts are oversold.

EmsoffLambs

Krash, I just sent you a PM. I just reloaded the forum files to my ftp and the forum is working again for now, but I am concerned that it will go down again. I can now access my error log and I don't see anything that catches my eye before today. Only incorrect passwords and waiting approvals. The only critical errors were admin login attempts where I or the other admin entered the wrong password.

Sir Osis of Liver

Was going to suggest reload.  Did you delete everything before replacing files?  Suspected your forum was hacked, it was acting erratically last night.  Sometimes I got SMF failed connection error (which means it reached the forum), sometimes an unable to load browser error, most often blank screen. 

There was a file in your forum root, dbtest.php, that appears to be a db test file.  I've deleted it.  It's possible a bot found it and was hammering it, causing a huge number of db connections.  If your account provides activity logs, you should be able to see if the file was taking a lot of hits.  Don't see anything else out of place, looks like a clean install otherwise. 

Might be a good idea to change your passwords - admin, cpanel, ftp, database.  You should also upgrade to 2.0.10, there've been a number of security patches since 2.0.6.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

EmsoffLambs

Thank you sooo much! I will do all of that. I did not delete the old files prior to the reload but I will do that now. Hopefully that was the problem. I will change all passwords too. Thanks again.

Advertisement: