From: Mike S. <m...@pe...> - 2007-01-08 06:50:33
|
On Thu, 4 Jan 2007, Robert Jacobson wrote: > LOL! I always do this -- when I've explained the problem to someone > else, I figure it out myself soon after! That's the kind of problem I like hearing about :). > My DBI_wrapper.pm is mimicking Appender::DBI already, in that it does > _init() (connects to the database) on new() and calls > Appender::DBI::log() to log the message. > > I can change my new() to *not* call _init(); instead, I call _init() > right before Appender::DBI::log(), then I disconnect. By the way, you might want to take a look at mysql_auto_reconnect This attribute determines whether DBD::mysql will automatically reconnect to mysql if the connection be lost. This feature defaults to off; however, if either the GATEWAY_INTERFACE or MOD_PERL envionment variable is set, DBD::mysql will turn mysql_auto_reconnect on. Setting mysql_auto_reconnect to on is not advised if 'lock tables' is used because if DBD::mysql reconnect to mysql all table locks will be lost. This attribute is ignored when AutoCommit is turned off, and when AutoCommit is turned off, DBD::mysql will not automatically reconnect to the server. in the DBD::mysql manpage, wouldn't this solve your problem? -- Mike Mike Schilli m...@pe... > Anyway, I think I've got it figured out now -- but if anyone sees > problems with it, please let me know. > > > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > Robert Jacobson .......................... > Flight Ops. Team Solar Dynamics Observatory (SDO) > ............. .............. > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |