Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Close connection?

Quote Reply
Close connection?
We have a MySQL database using DBMan that recently has started having problems. Our web host says that the script is "leaving connections to the database open and as all these connections are left open it causes the server to crash once it hits around 150 open connections".

Can someone point me in the right direction as to the remedy for this problem?

Thanks!

Donm
Quote Reply
Re: [donm] Close connection? In reply to
Here is a copy of the email that our webhosting company sent us... we are not really sure that we are actually causing the server to crash. We have been running our DBMan database for almost 3 years without any problems. Where would we begin to look in the script for connections that are being "left open"?

Here is the message from the webhosting company:

"The problem is that customers using the database server are leaving
connections to the database open and as all these connections are left
open it causes the server to crash once it hits around 150 open
connections. After running a log on the server to see whom had open
connections the last time the server went down it came to our attention
that you at that point in time had over 50 open connections to the
server. This is over 1/3 of the load that would make it crash. I would
suggest fixing your scripts so that they close the connection to the
database and that will solve many of the problem you are currently
seeing with the database server being down. If this continues to happen
we will have to deactivate your scripts until you correct the problem."

Any help would be greatly appreciated!!!

Donm
Quote Reply
Re: [donm] Close connection? In reply to
Hi,

Is your DBMan SQL running on mod_perl?

If no, I am sure that there is no leaving connections to database. Once your site is response the connection is automatic closed. The 150 connections seems to be to small if your host has many sites running.

Cheers,

Dat

Programming and creating plugins and templates
Blog