On Jan 4, 8:12 pm, zvoase <crack...@gmail.com> wrote:
> > For one simple example: what if Apache decides to kill or restart the 
> > Django process
> > after a certain amount of requests have been processed (and I know
> > that many people have their servers set to do this)?  The threads
> > which were are running asynchronous tasks would be killed as well,
> > losing any tasks which hadn't yet been completed.
>
> To be honest, I hadn't thought about that; that indeed would make it
> difficult to implement async signals. However, the aggregated 'join'
> method could be called after the receivers have all finished, as
> Apache will not terminate the Django process until all requests have
> been handled; so there are probably ways around this.

Not true, Apache doesn't necessarily wait for all current requests to
complete before shutting down child worker processes. For a non
graceful restart or shutdown, Apache will give the process about 3-4
seconds to exit and if it doesn't exit then it will kill it. Thus if
there were active requests which take longer than that to complete,
then they will be interrupted.

There is a bit more to it than this but exact details depend on which
hosting mechanism you are using in conjunction with Apache.

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

Reply via email to