On Nov 4, 4:26 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On 03-Nov-07, at 8:57 PM, Sander Dijkhuis wrote:
>
> > I often have to reload one project because I've updated the code.
> > Currently, I use `/etc/init.d/apache2 reload`
>
> why dont you do apache2ctl graceful?

As far as the consequences on a loaded Django application is
concerned, doing a graceful as opposite to a restart (OP wrongly said
reload), is not really any different.

The main issue is that you have still thrown out of memory all the
other loaded Django instances including any current cached state. You
thus have to incur the cost across sites for reloading all the Python
modules and then any hit in caching any initial data from lookups
triggered by subsequent requests.

For some people, needlessly doing this on sites that don't require it
may be significant. Even if for an individual site it is not
excessive, it would be if you are running 20 sites on the same server
and could tie up the server for a short period if you have sufficient
requests across all sites so as to cause them to be all loaded up at
the same time.

Part of the reason this is the case is Python's import lock. When a
request arrives and has to import the application for the first time,
it will lock out anything in other threads, even if in different sub
interpreters (ie., sites), from being able to proceed through its own
imports.

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