Graham, thank you very much for your comments. On Nov 17, 12:37 am, Graham Dumpleton <[email protected]> wrote: > Web applications assuming they can change directories for individual > requests or which only work when run from a specific directory are > arguably poorly designed. Such techniques will never work properly > where multithreading is used or where multiple instances of the > application need to run in same process. > > It is much better that file system accesses always be by absolute pathname.
I'm pretty new to mod_wsgi, but I can see now how it is bad practice in a multithreaded environment. In the future I will use absolute pathnames. > Not scalable and lean in what way? > > You will use just as much memory if you were to create as many > distinct process groups as you have applications and with each having > 8 processes each running a single thread. > > The only thing wrong I can see in above is that it will still not > solve problem where a web application expects to always be run out of > a specific directory and only sets that directory location once when > web application first loaded. This is because last such similar > application to load will override location for others due to web > application instances still being in same process. Not scalable because it currently uses a global configuration file for the server. This means all different sites on that server will be run using those 8 processes. When the amount of traffic increases 8 processes may not be enough. > > At the moment only by duplicating WSGIDaemonProcess/WSGIProcessGroup > configuration for each application. > > Because I don't know whether you are currently using WSGIScriptAlias > on specific WSGI script file, or mapping it against a directory of > WSGI script files, or using AddHandler, can't guide you as to exactly > what you need to do. I control the mod_wsgi flow using .htaccess files and AddHandler. The problem is that I don't have full control (at the moment) of the system administration. The global configuration file was set by the administrators. > Short answer is though that you aren't restricted to one > WSGIDaemonProcess/WSGIProcessGroup configuration. > > Can you provide the rest of your mod_wsgi related configuration? My first post contains all the configuration except the .htaccess configurations. > Can you also explain why your web applications are changing the > working directory in the first place and not using absolute path names > for file system access as would be regarded as being best practice? Just my ignorance. > Graham I'm afraid that my current configuration will also combine the PATH variables for different websites. Using a ProgressGroup per website would solve that, but I don't know how to accomplish that with my limited server administration rights. Is there any other way or should I just ask for more rights on the server because it isn't workable otherwise? On another note, great work on mod_wsgi. I really like its speed and functionality. Daan -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=.
