Re: Graceful Reloading for Schema Changes - UWSGI - Gunicorn?

2015-04-16 Thread Roberto De Ioris

>
>
> Hello Djangonats,
>
> How do you reload Django script changes with UWSGI? I know `touch-reload
> `
> exists with UWSGI however I was looking more into what uwsgi does when the
> schema(s) in the models change? How do you handle database changes without
> affecting or rebooting the server? Rebooting UWSGI does not sound like a
> good idea.
>
> A Load Balancer (HAProxy) ?
>
> *More Questions*
>
> Does something like that exist in Gunicorn?
>
> Regards,
>
> Shapath.
>
>

The topic is huge and there are dozens of approaches, but basically every
WSGI server requires a new (updated) process address space after code
change
(included schema changes if the model is already loaded into memory).

So, even if it may look "extreme", reloading the whole WSGI server is the
only reliable solution (in fact used by everyone).

If you are scared about potential downtimes check this article:

http://uwsgi-docs.readthedocs.org/en/latest/articles/TheArtOfGracefulReloading.html

But take in account that 99% of the times/cases a simple graceful reload
is more than enough.


-- 
Roberto De Ioris
http://unbit.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c444f30b5e1e079782ec3d8b21caaf5b.squirrel%40manage.unbit.it.
For more options, visit https://groups.google.com/d/optout.


Re: Graceful Reloading for Schema Changes - UWSGI - Gunicorn?

2015-04-16 Thread Stephen J. Butler
I'm not familiar with uWSGI. On gunicorn you send it SIGHUP (kill -HUP
pid) and it will reload w/o interrupting requests. Looks like uWSGI
supports something similar:

https://uwsgi-docs.readthedocs.org/en/latest/Management.html#signals-for-controlling-uwsgi

On Thu, Apr 16, 2015 at 11:32 AM, Shapath Neupane
 wrote:
> Hello Djangonats,
>
> How do you reload Django script changes with UWSGI? I know `touch-reload`
> exists with UWSGI however I was looking more into what uwsgi does when the
> schema(s) in the models change? How do you handle database changes without
> affecting or rebooting the server? Rebooting UWSGI does not sound like a
> good idea.
>
> A Load Balancer (HAProxy) ?
>
> More Questions
>
> Does something like that exist in Gunicorn?
>
> Regards,
>
> Shapath.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3a98ec4e-d9e2-4bb7-8783-cd97ac7a8acb%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAD4ANxWUg%2BXFdpw7S6we%2BDfNfev9SDsDonfXEsh96_mTU2w3kw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Graceful Reloading for Schema Changes - UWSGI - Gunicorn?

2015-04-16 Thread Shapath Neupane
 

Hello Djangonats,

How do you reload Django script changes with UWSGI? I know `touch-reload 
` 
exists with UWSGI however I was looking more into what uwsgi does when the 
schema(s) in the models change? How do you handle database changes without 
affecting or rebooting the server? Rebooting UWSGI does not sound like a 
good idea.

A Load Balancer (HAProxy) ?

*More Questions*

Does something like that exist in Gunicorn?

Regards,

Shapath.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3a98ec4e-d9e2-4bb7-8783-cd97ac7a8acb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.