Page 1 of 1

"Too many connections in" error... some questions.

PostPosted: 05. June 2006 18:28
by ozental_uk
Hi there, I hope someone can help me. I run my own server with Windows 2000 Server and 1GB of RAM, running a phpBB v2.0.20 forum and some 'minor' web pages. Every now and again, usually at peak traffic times, I get a "Too Many Connections in... mysql4.php" error, which blocks my users from accessing the site.

I've been trying to find out how to solve this and have seen many posts on the 'Net re-persistent connections and modifying /etc/my.cnf to increase the "max_connections" parameter to around 500 or there abouts.

Anyway, my questions are these...

1. I'm unsure as to whether this issue is an Apache issue, or a mySQL issue. Can someone shed some light?

2. The last time I saw this, my 1GB of memory was being completely used up. Restarting Apache alone didn't make a difference, so I restarted mySQL as well and all is OK. Did the issue occur because the memory was all used up? Is it normal for 1GB of memory to be too small, or is it just 'settings' that need to be played with to sort this out.

3. I use a version of Xampp which comes with pre-build versions of mySQL and Apache and I can not find a /etc/my.cnf file at all, and none of my other files contain any 'max_connections' parameters. Should I have this file, or is it an option? Could this setting me put anywhere else, like php.ini or anything like that? (In fact, I don't have an /etc/ directory at all anywhere that I can find).

4. What do 'persistant connections' mean in terms of speed for a 'moderately busy' phpBB forum, with roughly 15-20 users and around 10-15 guests online at most times? Should persistant connections be turned off?

5. I saw a post on another forum (http://www.vbulletin.com/forum/showthread.php?t=170008) that shows a list of mySQL variables. How does one get this listing? Is there a command to show them?

6. Could running older/newer versions of Apache or mySQL fix this problem, or is it, as mentioned above, just an setting thing?

7. Whilst not ideal in any way, would restarting Apache or mySQL daily reduce the chances of this happening?

Help to each of these points would be much appreciated.