-----Original Message----- >From: Jeremy Kister <[EMAIL PROTECTED]> >Sent: May 10, 2007 12:17 AM >To: beginners@perl.org >Subject: Re: forking problem with dbd::mysql > >On 5/9/2007 11:12 AM, Chas Owens wrote: >> my $dbh = DBI->connect($dsn, $dbun, $dbpw, {RaiseError => 1}); >> >> to >> >> my $dbh = DBI->connect( >> $dsn, $dbun, $dbpw, >> { >> RaiseError => 1, >> mysql_auto_reconnect => 1 >> } >> ); > >Yes, that works, just as a regular my $dbh = DBI->connect() inside the >loop, before the SELECT. > >The problem is, in reality, my real code doesnt sleep in the loop, and >reconnecting each time would be quite intensive. > > >FYI, I found that when using DBD::Sybase, the problem does not exist. > >Should I take this over to the mysql-perl list ? > >Thanks!
What I think is instead of obtaining the $dbh from parent,you would better re-create a dbh object in child after forking. -- mailto:[EMAIL PROTECTED] http://home.arcor.de/jeffpang/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/