On May 9, 5:16 am, Pigletto <[EMAIL PROTECTED]> wrote:
> > The only thing thatmod_wsgiwould still give you through its daemon
> > mode is the ability to isolate WSGI applications into their own
> > processes so they do not interfere with each other. As I understand it
> > though, WebFaction has limits on the number of persistent processes
> > you have, thus am not sure you can effectively use daemon mode in
> > their environment without hitting these limits.
>
> There are no limits for a number of long running processes at
> Webfaction.
>
> Is there a kind ofmod_wsgisetup that allows to considerably reduce
> memory usage in comparision with apache prefork mode?

If you mean compared to Apache prefork and mod_python then answer is
yes.

Even without using mod_wsgi though, one can do better than prefork
with mod_python by using Apache worker MPM instead. Because Apache
worker MPM processes are multithreaded you don't need as many to be
running and so less copies of your application in memory.

Of course, your application has to be multithread safe. If you are
also trying to use PHP on same server, that can be a big problem as
not all PHP code and/or third party packages for it may be thread safe
depending on what versions you use.

If using mod_wsgi, you have two choices. Use it in embedded mode but
use Apache worker MPM. This will comparable results to mod_python,
although memory footprint of mod_wsgi by itself will be slightly less.

Whether you use Apache worker MPM or not, when using mod_wsgi you can
also use it in daemon mode. This is similar to fastcgi in the sense
that your web application is run in separate process(es), but mod_wsgi
will handle all the management of those processes, starting them up
and restarting them as necessary.

For a description of the various process/thread combinations when
using Apache/mod_wsgi read:

  http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading

Examples of using daemon mode described in section 'Defining Process
Groups' of:

  http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines

Also refer to the rest of that documentation, documentation about
configuration directives and integration guide for Django as well.

Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to