Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > apache/mod_wsgi daemon mode

Reply
Thread Tools

apache/mod_wsgi daemon mode

 
 
Scott SA
Guest
Posts: n/a
 
      02-03-2008
HI,

I'm posting this here because it is, I believe, a python config issue (mine) that is not correct, but frustration and inexperience has left me without further [visible] options for rectification.

I am trying to configure mod_wsgi to run in daemon mode with Apache. I can easily get it to run 'normally' under Apache but I obtain permission errors _or_ process-failures in daemon mode. Specifically:

... (13)Permission denied: mod_wsgi (pid=26962): Unable to connect
to WSGI daemon process '<process-name>' on
'/etc/httpd/logs/wsgi.26957.0.1.sock' after multiple attempts.


My httpd.conf contains an entry like this, and has had several variations:

<VirtualHost host.domain.com:80>
ServerName host.domain.com

WSGIDaemonProcess <process-name> user=<user> group=<group> threads=10 \
maximum-requests=500

# the following line has been added/removed with no improved results
WSGIProcessGroup <process-name>

WSGIScriptAlias /something /path/to/<script>.wsgi

<Directory /path/to/<script>.wsgi>
# the following two lines have been added/removed
#with no improved results
WSGIApplicationGroup <user>
WSGIProcessGroup <process-name>

Order deny,allow
Allow from all
</Directory>

...
</VirtualHost>


My <script>.wsgi is as follows - but we never get this far!:

import os, sys
sys.stdout = sys.stderr

# in this instance, I've been testing with a trac instance
os.environ['TRAC_ENV'] = '/path/to/trac'

import trac.web.main
application = trac.web.main.dispatch_request



I have made changes in a number of combinations, trying to pinpoint where the problem is occurring. If I don't attempt to run this as a daemon, all is fine. I have noted where I have added/removed the ProcessGroup adn ApplicationGroup directives in an attempt to find the root of problem.

The host is Apache 2.2n under CentOS 5.1 i386 running Python 2.4

I have read, and re-read, mimicked settings from the following sites:

http://code.google.com/p/modwsgi/wik...rationWithTrac
http://code.google.com/p/modwsgi/wik...tionGuidelines
http://code.google.com/p/modwsgi/wik...tionDirectives

as well as several excelent postings from Graham Dumpleton

So, if you listen close enough, you will hear the sound of my head banging against an unforgiving brick wall

Thanks in advance to any and all relevent advice or suggestions.

Scott
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: PEP 3143: Standard daemon process library (was: Writing awell-behaved daemon) Floris Bruynooghe Python 1 03-24-2009 02:58 PM
Re: PEP 3143: Standard daemon process library (was: Writing awell-behaved daemon) Jean-Paul Calderone Python 0 03-20-2009 01:02 PM
Daemon Win32::Daemon; ph1975@gmail.com Perl Misc 0 09-07-2006 10:58 AM
mmm-mode, python-mode and doctest-mode? John J Lee Python 3 12-01-2005 08:35 PM
Safe Mode (?) - It is meant to be normal mode but looks like safe mode English Patient Computer Support 3 10-03-2004 11:10 PM



Advertisments