[mod_python] "Internal Server Error"

Wouter van Marle wouter at squirrel-systems.com
Wed Jun 28 06:15:05 EDT 2006

On Wed, 2006-06-28 at 01:21 -0400, Graham Dumpleton wrote:
> Wouter van Marle wrote ..
> > Hi all,
> > 
> > Looking through my stats I see some of my users still get an "500
> > internal server error". Is there any easy way to prevent this?
> > 
> > I've cut down on this already seriously by doing some POST checks (if
> > the parameter does not exist, reroute to the section's home page instead
> > of serving an empty page - which causes Apache to serve an "internal
> > server error").
> > 
> > The current errors are usually from so malformed input I get a crash
> > (I've to look into that, I know), or more frequently from mistypings in
> > the URL (http://host/python/main.py/pagename). 
> Is it definitely coming from mod_python code? Does it generate any sort
> of Python stack trace in the Apache error log or any other message? If
> using mod_python 3.2.8, pretty well all of the places in mod_python
> which generate a 500 error should log a stack trace or some other
> informative message as to why the 500 error was generated. Also, when
> you say crash, do you mean the 500 error, or an actual Apache crash
> due to a segmentation fault or something?

For example: - - [25/Jun/2006:18:19:35 +0800] "GET /show_page.py/main
HTTP/1.0" 500 538 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp;

This is an invalid URL, but instead of a 404 it gives a 500 error. As
it's asking for a .py file, it's passed on to the python interpreter. No
info in the logs - neither from Python, neither from Apache that it's


> Graham

More information about the Mod_python mailing list