perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Peters <>
Subject Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in
Date Wed, 14 Jan 2009 17:52:36 GMT wrote:

> I have a vague recollection of reading about the
> circumstances in which filehandles can be inherited, but
> can't remember where. 

I've been bitten by this a few times. Filehandles (and thus sockets) are inherited across
forks. If 
your system isn't very busy you won't notice a problem. But when things heat up you will start
get very strange problems. And I do mean strange.

I was doing something with Inline::Java (which communicates over a socket to a JVM) under
and the communication was getting all garbled. Multiple processes were sending and reading
off the 
socket which confused the other processes since they were all getting partial reads on their
and partial reads from the data for other processes. But the problems only happened during
busiest 2 weeks of the year and were fine the rest of the time. But those weren't very fun
weeks :)

Michael Peters
Plus Three, LP

View raw message