From: Eric Schwartz Date: 2004-09-16T02:54:50+09:00 Subject: Re: Lost connection to MySQL server during query "Robert Klemme" writes: > Another reason might be the fork after the DBI.connect() - the child might > close the connection on exit. I'd move the DBI.connect to the line > directly prepending "sth = ...". I suspect that may be the case, but in the actual application, I have an already-open DBI handle that I don't want to lose just because I fork(). That is, my overall flow is: $DBH = connectDB(...) # do lots of stuff, some of it with $DBH fork { fork { # do child stuff here } } # do more $DBH stuff here If there's no way around it, there's no way around it, and life sucks, and I just re-connect after the fork, and hope the original gets properly cleaned up somehow. > Maybe it closes the connection on startup. Since your child process > doesn't seem to need the connection I'd create it immediately before I use > it. That's unfortunately a side effect of my attempt to create a clean example. -=Eric -- Come to think of it, there are already a million monkeys on a million typewriters, and Usenet is NOTHING like Shakespeare. -- Blair Houghton.