Gossamer Forum
Home : General : Perl Programming :

Correct way to close a DBI connection...

Quote Reply
Correct way to close a DBI connection...
Hi,

I've been using DBI connections for a while now (normally just use GT::SQL <G>). I've recently come across a problem though, whereas quite a few of the processes keep running on.

I know this isn't down to the process being too long; and have an idea that it *could* be down to the connection being closed correctly.

I've tried many methods;

$sth->disconnect;
DBI->disconnect;
$sth = undef;

and quite a few more. However, none of these seem to close the connection correctly.

NB, the MySQL server is a different one to the main web-server (i.e the one that has the sites on), would this have anything to do with it?

The only reason I noticed anything going on, was because at peak times, we have been getting an error message, about needing to use "mysqladmin flush-hosts". As a temp fix, I've set this up on an hourly cron, but I'd rather get to the bottom of the problem Smile

TIA!

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread Correct way to close a DBI connection... Andy 13233 Mar 18, 2005, 2:03 AM
Post Re: [Andy] Correct way to close a DBI connection...
Andy 13095 Mar 21, 2005, 2:41 AM
Thread Re: [Andy] Correct way to close a DBI connection...
Chaz 13070 Mar 22, 2005, 8:05 AM
Thread Re: [Chaz] Correct way to close a DBI connection...
Andy 13073 Mar 22, 2005, 8:08 AM
Thread Re: [Andy] Correct way to close a DBI connection...
Chaz 13094 Mar 22, 2005, 8:17 AM
Post Re: [Chaz] Correct way to close a DBI connection...
Andy 13038 Mar 22, 2005, 8:31 AM