Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat causes Django to use 500.html only 3 out of 6 times?
    primarykey
    data
    text
    <p>This is the bizarre. </p> <p>I have a 500.html template below. When I refer to a page that does not exist via the url, my 500.html will show three times (if I try to reload the page repeatedly), then I get the apache Internal Server Error three times. My broser keeps flipping between the two.</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;title&gt;Page unavailable&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;h1&gt;Page unavailable&lt;/h1&gt; &lt;p&gt;Sorry, but the requested page is unavailable due to a server hiccup.&lt;/p&gt; &lt;p&gt;Our engineers have been notified, so check back later.&lt;/p&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>During the three times I get the Apache Internal Server Error, the error logs say 500.html does not exist - but it does. It pulled it up three times before. </p> <p>I cleared the cache and tried a different browser with the same results.</p> <p>Thanks for any help.</p> <p>EDIT 1</p> <p>Excerpt from error log:</p> <pre><code>[Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] mod_python (pid=8262, interpreter='127.0.1.1', phase='PythonHandler', handler='django.core.handlers.modpython'): Application error [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] ServerName: '127.0.1.1' [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] DocumentRoot: '/var/www' [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] URI: '/test' [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] Location: '/test' [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] Directory: None [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] Filename: '/www/test/wsgi.py' [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] PathInfo: '' [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] Traceback (most recent call last): [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1537, in HandlerDispatch\n default=default_handler, arg=req, silent=hlist.silent) [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1229, in _process_target\n result = _execute_target(config, req, object, arg) [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1128, in _execute_target\n result = object(arg) [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/django/core/handlers/modpython.py", line 180, in handler\n return ModPythonHandler()(req) [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/django/core/handlers/modpython.py", line 158, in __call__\n response = self.get_response(request) [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 153, in get_response\n response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 228, in handle_uncaught_exception\n return callback(request, **param_dict) [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/django/utils/decorators.py", line 91, in _wrapped_view\n response = view_func(request, *args, **kwargs) [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/django/views/defaults.py", line 32, in server_error\n t = loader.get_template(template_name) # You need to create a 500.html template. [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/django/template/loader.py", line 145, in get_template\n template, origin = find_template(template_name) [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/django/template/loader.py", line 138, in find_template\n raise TemplateDoesNotExist(name) [Tue Mar 05 22:28:22 2013] [error] [client 127.0.0.1] TemplateDoesNotExist: 500.html </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload