1

I've deployed a django-application, which basically works fine. The only problem I have is that there are sometimes requests hanging, and I can't find the reason for this. "Hanging" means, e.g. if I click on a link in the admin backend, the browser loads (and the apache access log does not even show a GET-request at this time), but gets no answer. Only if I request again, it gets answered.

I tried out many different WSGI-Configurations, including Daemon/embedded mode changes, changes in the amount of processes and threads etc. I just don't have an idea where to search further. Here my current apache configuation:

<VirtualHost myserver.com:80>
    ServerName myserver.com

    Alias /media/ /opt/myserver/static_media/admin/
    Alias /favicon.ico /opt/myserver/static_media/img/favicon.ico

    WSGIScriptAlias / /opt/myserver/myproject.wsgi
    WSGIDaemonProcess myserver.com user=www-data group=www-data processes=2 threads=15
    ErrorLog /var/log/apache2/myserver-error.log
    CustomLog /var/log/apache2/myserver.log common

</VirtualHost>

And my wsgi-file:

import os, sys
sys.path.append('/usr/local/django')
sys.path.append('/opt/myproject')

os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'

import django.core.handlers.wsgi

application = django.core.handlers.wsgi.WSGIHandler()

Any ideas?

schneck
  • 10,556
  • 11
  • 49
  • 74
  • This is the default setting (http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide), btu I also tried with less threads, without success – schneck Dec 01 '10 at 09:45

1 Answers1

1

Please check the Apache error logs. There might be a python error/stacktrace in there.

I also think you miss the assignment of the daemon to a hosted folder:

<Directory /opt/myserver/>
    WSGIProcessGroup server.com
    Order deny,allow
    Allow from all
</Directory>
vdboor
  • 21,914
  • 12
  • 83
  • 96
  • thanks for the hint - unfortunately, there is nothing in the logs, neither in the apache (access/error)-logs, nor in the custom logs. I added the directory-restriction as you suggested, and will observe whether it helps. – schneck Dec 01 '10 at 15:22