BeautifulSoup inside Django view timeout WSGI

For some strange reason, when I create a BeautifulSoup object inside a Django view, the WSGI timeout. Any help is appreciated as I knock my head against the wall for several hours and cannot find the root of this problem.

View:

def index(request):
    soup = BeautifulSoup('<b>Bold</b>') # Removing this line solve the proble
    return HttpResponse('Hello')

Apache log error message:

[wsgi:error] [pid 4014] [client 127.0.0.1:50892] Timeout when reading response headers from daemon process 'test.local': /htdocs/test/test/wsgi.py

Update: this looks like a bug in BeautifulSoup, but soution does not exist.

+4
source share
1 answer

Python, C, scipy, numpy Beautifulsoup, Python -, mod_wsgi . .

http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Python_Simplified_GIL_State_API

, conf.

WSGIApplicationGroup %{GLOBAL}

WSGI , , . Django. , , .

+7

All Articles