First time here? Check out the FAQ!
0

exception raised by WSGI script

Hi,

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 'example.com|'.
[Sun Jan 12 09:37:20 2014] [error]
[Sun Jan 12 09:37:20 2014] [error] [client 11.123.219.127] mod_wsgi (pid=9594): SystemExit exception raised by WSGI script '/var/www/example/django.wsgi' ignored.
[...]

Please note the vertical bar after example.com

Create interpreter 'example.com|

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

Here is my /etc/apache2/sites-available/example.com file:

WSGIPythonEggs /var/www/mike/eggs
<VirtualHost 123.123.123.123:80>
     DocumentRoot /var/www/example
     ServerName example.com
     ServerAlias www.example.com
     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
     </DirectoryMatch>
     <Directory "/var/www/example/askbot/upfiles">
        Order deny,allow
        Allow from all
     </Directory>
     #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(.*)$ https://example.com/admin$1 [L,R=301]
     </LocationMatch>
</VirtualHost>

Development server log:

Exception happened during processing of request from ('123.123.123.123', 29433)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 582, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/local/lib/python2.7/dist-packages/django/core/servers/basehttp.py", line 150, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "/usr/lib/python2.7/SocketServer.py", line 638, in __init__
    self.handle()
  File "/usr/lib/python2.7/wsgiref/simple_server.py", line 116, in handle
    self.raw_requestline = self.rfile.readline()
  File "/usr/lib/python2.7/socket.py", line 447, in readline
    data = self._sock.recv(self._rbufsize)
timeout: timed out
nicanorl's avatar
55
nicanorl
asked 2014-01-12 09:51:52 -0500, updated 2014-01-12 19:24:25 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

1

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!

nicanorl's avatar
55
nicanorl
answered 2014-01-13 09:41:13 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

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

There you will likely find more detailed information.

Evgeny's avatar
13.2k
Evgeny
answered 2014-01-12 11:10:55 -0500
edit flag offensive 0 remove flag delete link

Comments

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/forms.py TIME: 2013-12-24 01:34:48,197 MSG: forms.py:clean:79 unknown provider name /proc/self/environ"

nicanorl's avatar nicanorl (2014-01-12 11:45:22 -0500) edit
add a comment see more comments