[ale] apache2 process hanging
James P. Kinney III
jkinney at localnetsolutions.com
Mon Mar 1 12:27:39 EST 2004
I think it's perl issue. Fletch will correct me if I'm wrong.
A workaround is to append all the output data to an array and print it
in one print loop at the end.
I seem to recall some major differences between 5.0 and 5.8. I know
there are aspects of 5.8 that have cased pain in big applications
(Interchange) due to the threaded perl that RedHat ships with. Threaded
perl is a great idea, but it can cause problems if the app is not
designed to avoid it if not needed. I don't know enough to use it so I
had to recompile perl to be non-threaded for use in Interchange.
On Mon, 2004-03-01 at 10:02, Armsby John-G16665 wrote:
> 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.
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
--
James P. Kinney III \Changing the mobile computing world/
CEO & Director of Engineering \ one Linux user /
Local Net Solutions,LLC \ at a time. /
770-493-8244 \.___________________________./
http://www.localnetsolutions.com
GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney at localnetsolutions.com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the Ale
mailing list