On 8 December 2010 20:37, Stéphane Klein <[email protected]> wrote:
> Hi,
>
> I use Pylons 1.0 Framework and mod_wsgi on production server.
>
> I can use my application but randomly 1 request on 10 I've error :
>
> "Internal Server Error" in browser and in error log file :
>
> [client 82.231.115.1] Premature end of script headers: demo.wsgi, referer:
> http://example.com/
Need to see the error messages before and after this and for matching
time in main Apache error log if you are using a virtual host specific
error log.
This message will arise in a few circumstances.
The first is that WSGI script file is being executed as a CGI script
for some reason.
The second is that the mod_wsgi daemon process is crashing.
The third is that daemon process is being forcibly restarted while
there are active requests which haven't responded in time.
> I've read already many documentation page about this issue on mod_wsgi and
> Pylons website.
>
> Have you some idea about this error ?
>
> More information about my configuration :
>
> * I use apache2 from Debian package
> * I've compiled Python 2.6 from source code
> * I've compiled mod_wsgi-3.3 from source code (I've also tested with
> mod_wsgi-2.8, same error)
>
> <VirtualHost *:80>
> ServerName example.com
>
> <IfModule mod_wsgi.c>
>
> WSGIScriptAlias / /home/examplecom/demo/demo.wsgi
> WSGIDaemonProcess mydemo threads=1 maximum-requests=500
> inactivity-timeout=500 processes=1 display-name=%{GROUP}
A very odd configuration.
You are running a single process with a single thread in it.
That it is a single thread only though, means that you can't be
incurring third possibility above though as a forced restart due to
maximum requests being reached as there can't be a concurrent request
that is being interrupted.
You can get a forced shutdown when request is still current due to
inactivity timeout if the request hangs for 500 seconds for your
configuration, but in that case I would say you would notice the hang
given that that is almost 10 minutes before that could kick in.
I would suggest so as to get more information if it is something
related to maximum requests or inactivity timeout, that you ensure
using:
LogLevel info
in Apache configuration and not the default:
LogLevel warn
Have a good look for segmentation fault messages in main Apache error
log as well.
Graham
> WSGIProcessGroup mydemo
> WSGIApplicationGroup %{GLOBAL}
>
> </IfModule>
>
> ErrorLog /home/examplecom/demo/error.log
> LogLevel info
>
> </VirtualHost>
>
> Thanks for your help.
>
> Regards,
> Stephane
> --
> Stéphane Klein <[email protected]> - French
> blog: http://stephane-klein.info
> twitter: http://twitter.com/klein_stephane
> pro: http://www.is-webdesign.com
>
> --
> 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.
>
>
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en.