You'll probably get a quicker answer on this one at:
http://groups.google.com/group/turbogears
I've seen them dealing with odd errors like this occasionally.
Usually comes down to incorrect versions of installed packages that TG requires.
Graham
Graham
2008/5/7 zaf <Tom.Z...@gmail.com>:
Add options for 'user' and 'group' and setting them to the user/group
that you are running TG on command line from. This will determine if
the problem is a result of a permissions problem, ie., Apache user not
being able to access something.
In your account that you run TG from command line, run 'env' command
and work out if you are setting any special environment variables
which you think TG might be relying on for it to work. When running
under Apache it will not have the same environment variables.
You might want to write a very simple WSGI hello world like program
that echos back values from os.environ so you can compare the process
environment variables with what your user account uses.
Graham
One final thing to try in this area of user environments and
permissions etc. Work out what the current working directory of TG
application is when it is running. Ie. os.getcwd(), then set that same
directory as 'home' option to WSGIDaemonProcess. This will eliminate
any problems due to relative path names being used in your
configuration or code.
Other than that, only sort of problem would interference from
additional shared libraries, plus other Apache modules, that Apache
loads.
Graham
thanks for the effort you took in supporting TurboGears integration
with mod_wsgi. I'll work with TG1 team to make sure we find a fix to
avoid this path problem for i18n support ASAP.
I don't regret forwarding Zaf to your mailing list, even if this has
put some burden on you :p
Florent.
Only a daemon process allows you to specify a user that it can run as,
ie., distinct from Apache user that Apache child processes generally
run as. Daemon process mode also allows you to override the initial
current working directory of the process when it is started, and
provided that the one application only runs in it, and it doesn't
change the working directory, generally safe to run code which depends
on current working directory being that directory. In Apache child
processes, because notionally it is a shared system, that is, multiple
applications running, not generally safe to change and/or rely on
current working directory.
As to threads, helps to cut down on memory usage as you can use less
processes to handle same number of concurrent requests. Go have a read
of some of the older articles on my blog about memory usage and also
Python GIL.
Graham