DBI, custom function, connection lost
Steve Freegard
steve.freegard at LBSLTD.CO.UK
Mon Apr 19 13:10:53 IST 2004
Hi Bart,
> -----Original Message-----
> From: Bart Jan Buijs [mailto:bjbuijs at DOOTALL.COM]
> Sent: 19 April 2004 09:02
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: DBI, custom function, connection lost
>
> Hi all,
>
> I'm writing a custom function to read config values from MySQL.
> In order to do so i need to query MySQL each time a message
> is processed.
> No problem so far. Anyhow, the thing is, when i create a
> global DBI handle and connect for example in an Init
> function, the connection to the server is lost when a message
> is processed. Default connection timeout is 8 hours.
> The DBI handle remains intact correctly. Can someone help me?
>
This is probably the same problem that I encounter with MailWatch writing
the message logs to MySQL.
The only way I've found to get this to work is to use Perl-DBD-MySQL version
2.1028 or older, the more recent versions (>=2.9) do not seem to work
properly and cause the connection to be lost.
If you need to keep the newer version of DBI for another application - or
don't want to downgrade the system-wide DBD, see
http://sourceforge.net/mailarchive/message.php?msg_id=7096260 for a
workaround.
> So far, the only way i can read from MySQL is to reconnect
> everytime a message is processed. Please advice.
>
> Greetings,
>
> Bart Jan Buijs
>
Hope this helps.
Kind regards,
Steve.
--
This message has been scanned for viruses and dangerous content by MailScanner.
More information about the MailScanner
mailing list