in reply to Not your normal " Premature end of script headers:"

Hmmm, are there any quota issues involved? Those often look quite bizarre from the outside.

Maybe one of your CGI's isn't exiting correctly, so the httpd has too many child pids?

Or there's a filehandle leak somewhere and the later child processes can't open stdout?

Wild guesses all, but an lsof on the httpd and a ps checking on its child processes might point you to a better guess.

If that fails, truss or strace the httpd process with the "follow children" option once this starts happening, and see where the failure is coming from.


Mike
  • Comment on Re: Not your normal " Premature end of script headers:"

Replies are listed 'Best First'.
Re^2: Not your normal " Premature end of script headers:"
by almut (Canon) on Jun 18, 2008 at 14:56 UTC
    If that fails, truss or strace ...

    As the OP seems to be on Windows, StraceNT might be the tool of choice here... (but I'd second the suggestion in general, of course).   Also, it's probably a good idea to run a few tests outside of the webserver environment, to get familiar with the tool first...

      Downloaded StraceNT, and took a trace within that state, but I'm not really sure what I'm looking for. Any pointers?
Re^2: Not your normal " Premature end of script headers:"
by yegg (Acolyte) on Jun 18, 2008 at 19:00 UTC
    OK, it happened again.

    In that state:

    httpd ~330MB Threads: 500 User Objects: 423 Handles: 2,530 GDI Objects: 4 Context Switches: 28,475

    On reload:

    ~28-50MB pretty quick and growing Threads: 502 User Objects: 3-15 pretty quick Handles: 902 GDI Objects: 4 Context switches: 325-3000
    I got this using TaskManager and ProcessExplorer. I also took a trace using StraceNT, but it doesn't mean anything to me.

    Does anyone know where limits would be set? I have plenty of memory 4GB, and a postgresql process can go up to 756MB.

Re^2: Not your normal " Premature end of script headers:"
by yegg (Acolyte) on Jun 18, 2008 at 17:07 UTC
    When the server gets in this state, it happens for all non-mod_perl CGIs. I also made the simplest CGI I could think of for testing, which also fails:
    #!C:/Perl/bin/perl use strict; print "Status: 200 OK Test";
    If I then put this same script under mod_perl, it works fine. I will do what you said and report back with any findings or non-findings.

    I am getting the sense that the script isn't being executed at all.