[ale] apache2 process hanging

Armsby John-G16665 John.Armsby at motorola.com
Mon Mar 1 10:04:30 EST 2004


All,

I am at my dim wits end.  I have tried and cried.

I am moving a working perl cgi program from hpux 10, perl 5.003, apache 1.3.1 TO Red Hat Linux 9, perl 5.8, apache2.

The program reads a several meg text file, and spits out a table based upon form criteria.  The program compiles and executes with no problem.  THE PROBLEM is that the print output appears to be hanging in the buffer.  I get a little bit of output and then the program hangs.  I have grepped the process and find that it is asleep after a few seconds.  

I have seen a similar problem with a C cgi script that I moved over.  Liberally sprinkling the print statements with flush fixed the problem.

I have tried placing $| = 1; immediately before all my print statements.  No go.  I have seen some "select" code associated with a file handle use with setting $| to 1, but have been unable to make the leap from flushing a file handle.

I can't figure out if this is a perl problem or an apache2 problem.  Since I am taking the original Perl and moving it over, it appears that apache2 is handling buffering differently from1.3.1.

I am stumped.



More information about the Ale mailing list