2010/1/7 bharath venkatesh <[email protected]>: > Hi, > > is it possible to run mod_wsgi in multi threaded daemon mode in apache > prefork MPM. Apparently we are running mod_php and muiltple django > application that use django version 0.97 which is not thread safe out of > that we upgraded only one django application to newest version due some > reasons other django applications could not be upgraded. As in the post > http://stackoverflow.com/questions/1475960/performance-of-concurrency-in-django-apache2-prefork-modwsgi-what-am-i-doing/1481023#1481023 > ,where the last comment said "Even if you do still have to run single > threaded prefork MPM, the mod_wsgi daemon processes can still be > multithreaded" > > so is it possible to run one django application which is upgraded (which is > thread safe) in mod_wsgi multi threaded daemon mode and to run other django > applications (which is not thread safe) in mod_wsgi embedded mode and leave > mod_php as it is ?
Yes, one can do that. Just use WSGIDaemonProcess/WSGIProcessGroup appropriately such that the specific WSGI application is delegated to that multithread daemon mode process group. > if yes, what are the things we have to consider in doing so and is there any > problem that may arise in doing so ? You want to be careful about using embedded mode with Python applications. Read: http://blog.dscpl.com.au/2009/03/load-spikes-and-excessive-memory-usage.html You may want to consider running the non thread safe WSGI applications in daemon process groups as well. Just specify 'processes' to be more than one and 'threads' to be '1'. This means fixed number of processes and more predictable that embedded mode, which is going to be configured for PHP instead of for what Python requires. Graham
-- 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=en.
