Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Database Error: GForum--Too Many Connections.

Quote Reply
Database Error: GForum--Too Many Connections.
I am getting this error sometimes at our busier loads but we really don't have that many people online at the same time (20?). I am wondering if this is a setting on the database end or something in the GForum settings that we can adjust to allow more. Maybe my webhost is limiting this.

One suggestion someone told me to ask was if multiple browsers being open could be the cause. Are connections to the db kept alive on a per browser basis? I would think not but these users are silly and like to keep a browser open for each forum board they want to watch.

thanks for any info.
Quote Reply
Re: [mrknowitall] Database Error: GForum--Too Many Connections. In reply to
Hi,

Hmm, very strange. First off, what type of server and database are you using, and are you on a shared or dedicated server?

If you are on a shared server, it could be that someone else on the server is using up all the connections, so when you need it there are none left.

Keeping multiple browsers open does not keep a database connection open. Unless you are under mod_perl or SpeedyCGI, a database connection is only open while the page is loading, as soon as the page is loaded, the database connection is closed. MySQL defaults to allow at least 250 connections I believe.

Hope this helps,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Database Error: GForum--Too Many Connections. In reply to
Yes, we are on a shared server, and they are using Dell Poweredges running Linux I believe. The server is relatively new though (Aug22) and I didn't think that who ever the other sites are would be doing that much DB traffic yet. I am guessing at our peak we have maybe 20 users pulling on the forum pages. It's MySQL DB and yes our server uses mod_perl. Does that mean under mod_perl it might be keeping alive browser connections, and so a connection to the db? I know zero about what mod_perl does that makes things better.

Thanks,

Joe

http://www.mtcrossroads.org
Quote Reply
Re: [mrknowitall] Database Error: GForum--Too Many Connections. In reply to
Joe,

I had this exact same problem with my previous host. Also running mod_perl it reached a point where I had to go into my server twice a day and kill the large processes manually so the site would come back up again! It was not out of the ordinary to run up load averages of 36!

I have about 100 - 150 users in my forums at any time.

I moved my servers to Gossamer-Host and without touching the GForum code my load averages are now 0.2 - 3.0. I'd say this is almost certainly something on your server side. I'm unfortunately also a bit of an ignoramus when it comes to servers so I will be unable to suggest possible solutions.

Have you done a top and checked your load averages, CPU and Memory usage? Could be useful if you post those. Also, check if there are any large processes running and see who/what owns them.

Safe swoops
Sangiro
Quote Reply
Re: [mrknowitall] Database Error: GForum--Too Many Connections. In reply to
Hi,

Are you sure you are using mod_perl. It is extremely rare for a shared server to provide mod_perl. If you go to the admin and go to Tools->FileMan and click on Preferences then Environment, do you see:

Persistant Env: mod_perl (1)

If not, then while your server may have mod_perl installed, your script is not running under it, and you definitely don't have persistent connections.

Another thing to try is periodically go to your SQL monitor and run:

SHOW PROCESSLIST()

and that will display a list off all the active connections. Depending on how your host is setup you may be able to see other people in that list.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Database Error: GForum--Too Many Connections. In reply to
I believe I was mistaken about the mod_perl. That was on another server we were decideding to host with possibly. Anyway, with the SHOW PROCESSLIST, we only get our db connections and no one elses.

We don't have shell access so I can't go online and everything else runs through a CPanel setup. Can I do a top with backticks in perl and have it display?

Also, I am wondering if there is a builtin page timer that comes with this forum, like some debug flag I can flip that will put the page generation timestamp on the bottom of the page.

I am starting to suspect though that my problem is the other folks sharing our server. Tonight all cgi was out for ten minutes and then gradually came back, loading half pages. Someone is forking a lot of processes or sumtin.

Thanks,

MrKIA
Quote Reply
Re: [mrknowitall] Database Error: GForum--Too Many Connections. In reply to
Goto FileMan, and then click on Commands and type is:

ps aux

and you should see a list of all running processes. You may be able to see which script is using all the resources, and email your host about it.

Cheers,

Alex
--
Gossamer Threads Inc.