I have tried to set logging to info bu could not find anything
meaningful.
I will try to get error log later to post it here (maybe I missed
something).

Best regards,
Kirill Zaborsky

On Jan 7, 1:20 pm, Graham Dumpleton <[email protected]>
wrote:
> 2010/1/7 qrilka <[email protected]>:
>
>
>
> > Hello,
> > I have read quite a lot of discussions about problems leading to
> > 'PReamature end of script headers' line in apache log but I still can
> > not find a way to resolve it completely.
> > On avastep.ru we have a Django app (main functionality done with PIL).
> > Site works OK but from time to time I get a line in error log like:
> > ---
> > [Wed Jan 06 21:15:16 2010] [error] [client 85.175.67.142] Premature
> > end of script headers: factory.wsgi, referer:http://www.avastep.ru/
> > ---
> > and it appears that some of site users have problems.
> > I could not find any way to reproduce this problem otherwise than on
> > that working server.
>
> > httpd.conf for the site -http://dpaste.com/141757/
> > Software installed: CentOS release 5.2 (Final), Python 2.4.3, mod_wsgi
> > 2.8 (fromhttp://codepoint.net/attachments/mod_wsgi/)
>
> > Is there any way to diagnose what is wrong with server configuration
> > and how could it be fixed?
>
> Set:
>
>  LogLevel info
>
> in Apache configuration.
>
> If the messages coincides with mod_wsgi daemon mode process restarts,
> it may be because there are active long running requests at time when
> 'maximum-requests=50000' option of WSGIDaemonProcess is triggered.
> These may also be stuck requests.
>
> This could occur because when that process recycling is triggered, it
> will only wait so long, default 5 seconds, for any other active
> requests handled by the process to complete. If they don't complete
> the process is forcibly killed off. This killing off of the process
> would result in Apache server child process proxying the request
> seeing connection close and thus a premature end of the headers being
> returned by mod_wsgi daemon process.
>
> I realise the message is a bit confusing, but so happen to be using a
> bit of existing Apache code normally used when dealing with CGI
> scripts. Thus the message is actually same message as can get when CGI
> scripts don't return headers even though is a WSGI script handled by
> mod_wsgi.
>
> So, do you have long running requests which would take a long time
> before they generate the headers for the response?
>
> Graham
-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.


Reply via email to