On Nov 4, 2:27 am, Sander Dijkhuis <[EMAIL PROTECTED]> wrote:
> On our Apache server, we're hosting multiple Django projects. The
> Apache configuration is like this:
>
>   PythonAutoReload Off
>   <VirtualHost *:80>
>       ServerName first.example.com
>       <Location "/">
>           SetHandler python-program
>           SetEnv DJANGO_SETTINGS_MODULE first.settings
>           PythonInterpreter first
>       </Location>
>   </VirtualHost>
>   <VirtualHost *:80>
>       ServerName second.example.com
>       <Location "/">
>           SetHandler python-program
>           SetEnv DJANGO_SETTINGS_MODULE second.settings
>           PythonInterpreter second
>       </Location>
>   </VirtualHost>
>
> I often have to reload one project because I've updated the code.
> Currently, I use `/etc/init.d/apache2 reload`, but that causes all of
> our projects to be unavailable for some seconds. Is there a way to
> 'kill' one of the Python interpreters, so that only one specific
> project is reloaded?

No, there is no way with mod_python of doing what you want.

With mod_wsgi 2.0 it is however easy to do what you want provided that
you use daemon mode of mod_wsgi to delegate each virtualhost and/or
application to a distinct daemon process group.

The directive which would need to be set it WSGIReloadMechanism with
the option of 'Process'. For details on mod_wsgi 2.0, which first
release candidate is out for now, see:

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

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