httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Smeenk <>
Subject Scripts generating 4069+ bytes of STDERR logs jam Apache 2.0.45
Date Wed, 23 Apr 2003 14:32:03 GMT

I'm using Apache 2.0.45 (mpm-prefork). Recently I discovered that Apache2
doesn't like it very much when a CGI-script that it runs, generates
about 4K of debug data.

The apache2 process will hang in a poll().
The script process will hang in a write(2, "...").

If you wait long enough, apache2 times out the script, kills it, and you
get a 500. If you kill the script process by hand, it blurts out
'Premature end of script headers' followed by a part, but not all, of
the errors it should report and the browser-end is left waiting.

A simple test script would be:

| #!/usr/bin/perl -wT
| use strict;
| use CGI;
| my $CGI = new CGI;
| print STDERR "a" x 4096 . "\n";
| print $CGI->header();
| print "Hello folks!\n";
| exit 0;

This is bound to "hang" like described above. Tested on 3 systems.

It looks like Apache2 has a 4K buffer to store an errormessage and
something goes wrong when there's more than, or about 4K data to handle.

Is there any way to have Apache2 error.log's in simple format?
I only want the errors, not prefixed with date, time, type and client,
and postfixed with a referrer URL. I couldn't find anything yet.
It's really hard to read script debug information now ;)

Hope my information helps!

Kind regards,
Sander Smeenk.

| Thou shalt not weigh more than thy refrigerator
| 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8  9BDB D463 7E41 08CE C94D

View raw message