2009/1/7 Beetle B. <[email protected]>:
>
> On Dec 19 2008, 5:46�am, "Graham Dumpleton"
> <[email protected]> wrote:
>> This just highlights some stuff which was already in documentation,
>> but tend to find that people don't read deep enough to realise this is
>> possible and was getting a bit tired of comments onDjangoforums and
>> irc channels saying mod_wsgi couldn't do this. :-)
>
> Hi,
>
> I had a simple question about this:
>
> At some point in the past, our group considered using mod_wsgi (for,
> say, production purposes) with Django, with the intention of not
> having to restart Apache (on Linux) every time there is a change in
> the Django code.
>
> At the time we didn't pursue it because of issues with using certain
> modules (e.g. psycopg2, lxml) not behaving when there was a code
> change.
>
> Does this problem still exist when one uses the Process reload
> mechanism?
>
> Our final goal is to have the production site reflect changes after
> simply touching the wsgi file - and without restarting Apache...

In mod_wsgi 1.X with Interpreter reloading it was only destroying the
sub interpreter within the process and creating a fresh sub
interpreter. This as you would have found has issues with certain
third party Python modules which can't handle sub interpreters being
destroyed and recreated.

Because of those problems, Interpreter reloading was removed and
proper Process reloading added mod_wsgi 2.X as default instead for
mod_wsgi daemon mode. Thus, touching the WSGI script file now causes
whole daemon process to shutdown and new one created, just as if
Python process itself had been stopped an started.

Just be aware that some packages, including lxml (because of
simplified GIL state API usage) and some older versions of psycopg2
(because of a bad coding), have problems running in sub interpreters
and must run in main interpreter in the process. This is a separate
issue to sub interpreter destruction problem. Thus, if using lxml, you
probably still need to delegate application to run in main interpreter
using:

  WSGIApplicationGroup %{GLOBAL}

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to