Thread: PHP help
View Single Post
Old 12-06-2013, 12:11 PM   #2
photon
The new goggles also do nothing.
 
photon's Avatar
 
Join Date: Oct 2001
Location: Calgary
Exp:
Default

Since you're using phpBB software, you wouldn't want to get into the actual programming of the forum, the forum software itself is going to use mysql_connect() or similar to connect to the database.. changing phpBB itself is going to be far beyond what you can (or would even want) to do. Using mysql_connect() or similar is dictated from the config file for phpBB.

The other option you mentioned (changing the max_connection variable) sounds like what Fatcow is refusing to do.

That's the downside of shared/hosted solution is once you start to grow you will run very quickly into their limits. They can't have one customer eating all the resources on a server that's supposed to support many. And forum software is about the worst in terms of resource usage.

What version of phpBB are you running? If it's old there might be a bug in the software that's causing it to not release connections when they should and/or improvements that make the software better able to release connections when its done. You might try updating if it's behind in terms of version (which is a big thing, might be easier to move to a better host).

Are you running any add-ons/plugins/etc? Those sometimes can misbehave and take up connections and not release them as it should. Disabling them temporarily to see if things improve might be something to try.

Do you know what version of mysql and php the server is running?

What's the value for the "$dbms =" line in the config.php? mysql? mysqli? If it's 'mysql', and if the server is running fairly recent versions of mysql and php, you can try changing it to mysqli. What that will do is rather than phpBB creating a new connection to the database and then ending it for every request, it'll keep the connections open and reuse them (assuming phpBB takes advantage of this). This can help if the database isn't releasing connections fast enough (which would lead to your too many connections error).

I did a quick search and found lots of ideas to try (disabling some automatic processes of phpBB, installing caching software), but honestly I really think that that would be wasting time, you probably just are hitting the limits of a shared solution and should look for something more robust.
__________________
Uncertainty is an uncomfortable position.
But certainty is an absurd one.
photon is offline   Reply With Quote