"incomplete headers (0 bytes)" heisenbug appears to be DBI related

"Loren Osborn" <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
We are working with a Perl based system interfacing to a MySQL database
via DBI on an Apache 2 server using mod_fastcgi, and appear to be having
a sporadic problem with our FastCGI server-scripts getting SIGTERM
and/or SIGPIPE at unusual times, resulting in a mod_fastcgi error that
the script produced "incomplete headers (0 bytes)".  Different
server-scripts appear to exhibit the problem with different frequency,
but this frequency does seem mostly proportional to how often the script
is requested, so I currently believe that this is mostly a systemic
problem.  Watching the server-script most frequently afflicted with this
condition with strace, I have begun to theorize that the issue was
related to communication with the mysql server.  This frustrates me, as
I already added code to validate that the DBI handles are good at the
beginning of each iteration of the Accept() loop, and close and reopen
these handles if they are no longer working.  Attempting to diagnose the
specifics of the issue I added warn()s just before each database access
to try to identify the exact cause, which seems to suppress the problem,
at least under the minimal loads I'm able to put the code under in our
development environment. I can certainly trap and handle any fatal
errors that happen as a result of database access, but after several
iterations of trial and error, I'm not confident this will be sufficient
to prevent the problems we're experiencing.  Can anyone give any
suggestions on why specifically this may be happening, and how I may
prevent these conditions?

 

All suggestions welcome.

 

Thanks,

 

 


Loren Osborn

Lead Software Engineer

Dispensing Solutions Inc.

(714) 437-0330

3000 West Warner Ave.

Santa Ana, CA  92704

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.