I started here and I didn't read the rest of the many posts.


I tried this too under a variety of database and I think it comes down to

this:

You can't fork and network or other type of connection and expect

reality to remain continuous.



If I create an object that has a reference to single point in network

sockets (port number, unix socket) and I try to fork it...  What happens

to the network connections?



I can't get this to work under Oracle, Postgresql either.



I found I have to create/connect the $dbh AFTER fork().



On 5/9/2007, "Jeremy Kister" <[EMAIL PROTECTED]> wrote:



>I'm am having an issue with a mysql connection that displays itself when

>there's forking going on which I can't track down.

>

>I've made a test program at http://jeremy.kister.net/code/ftest.pl to

>demonstrate. I expect this program to print 'SQL RESULT: 1' for as long

>as it can.

>

>But instead:

>

>SQL RESULT: 1

>SQL RESULT: 1

>SQL RESULT: 1

>DBD::mysql::st execute failed: MySQL server has gone away at ftest.pl

>line 36, <STDIN> line 3.

>DBD::mysql::st execute failed: MySQL server has gone away at ftest.pl

>line 36, <STDIN> line 3.

>

>

>What's gone wrong?

>

>perl 5.8.3, sun4-solaris

>DBI 1.55

>DBD::mysql 3.0007

>

>--

>

>Jeremy Kister

>http://jeremy.kister.net./

>

>--

>To unsubscribe, e-mail: [EMAIL PROTECTED]

>For additional commands, e-mail: [EMAIL PROTECTED]

>http://learn.perl.org/

>

>

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to