Ask Your Question

exception raised by WSGI script

asked 2014-01-12 09:51:52 -0500

nicanorl's avatar

updated 2014-01-12 19:24:25 -0500


My website has been running for some weeks but now I'm seeing a 500 Internal Server Error.

Looking at the logs, I see:

[Sun Jan 12 12:37:19 2014] [info] mod_wsgi (pid=9594): Create interpreter '|'.
[Sun Jan 12 09:37:20 2014] [error]
[Sun Jan 12 09:37:20 2014] [error] [client] mod_wsgi (pid=9594): SystemExit exception raised by WSGI script '/var/www/example/django.wsgi' ignored.

Please note the vertical bar after

Create interpreter '|

Shouldn't it be just "". Is this causing the error. Where is this setting set?

Here is my /etc/apache2/sites-available/ file:

WSGIPythonEggs /var/www/mike/eggs
     DocumentRoot /var/www/example
     Alias /m/ /var/www/example/static/
     Alias /upfiles/ /var/www/example/askbot/upfiles/
     <DirectoryMatch "/var/www/example/askbot/skins/([^/]+)/media">
        Order deny,allow
        Allow from all
     <Directory "/var/www/example/askbot/upfiles">
        Order deny,allow
        Allow from all
     #must be a distinct name within your apache configuration
        WSGIDaemonProcess example
        WSGIProcessGroup example
        WSGIScriptAlias / /var/www/example/django.wsgi
     #make all admin stuff except media go through secure connection
     <LocationMatch "/admin(?!/media)">
         RewriteEngine on
         RewriteRule /admin(.*)$$1 [L,R=301]

Development server log:

Exception happened during processing of request from ('', 29433)
Traceback (most recent call last):
  File "/usr/lib/python2.7/", line 582, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/local/lib/python2.7/dist-packages/django/core/servers/", line 150, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "/usr/lib/python2.7/", line 638, in __init__
  File "/usr/lib/python2.7/wsgiref/", line 116, in handle
    self.raw_requestline = self.rfile.readline()
  File "/usr/lib/python2.7/", line 447, in readline
    data = self._sock.recv(self._rbufsize)
timeout: timed out
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-01-13 09:41:13 -0500

nicanorl's avatar

I have solved the issue. It seems that somehow the permissions of $HOME/memcached.sock where no more 777.

chmod 777 $HOME/memcached.sock

Solved it.

I spend many hours trying to solve it and the solution was so simple!

edit flag offensive delete link more

answered 2014-01-12 11:10:55 -0500

Evgeny's avatar

There is another log file that is collecting tracebacks from the python application itself. That file is specified in the If you had the default setup, the file is at <askbot project path>/log/askbot.log.

There you will likely find more detailed information.

edit flag offensive delete link more


Thanks, the file contains only one line, and the this log seems to be old: "/usr/local/lib/python2.7/dist-packages/askbot/deps/django_authopenid/ TIME: 2013-12-24 01:34:48,197 MSG: unknown provider name /proc/self/environ"

nicanorl's avatar nicanorl  ( 2014-01-12 11:45:22 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-01-12 09:51:52 -0500

Seen: 1,711 times

Last updated: Jan 13 '14