Ben, I minimize downtime as much as possible by doing things in advance like copying all of the new files to a staging area on the PROD system, automatically inserting PROD passwords, running collectstatic, dumping the DB in case of problems, etc. Then, I put up the maintenance page, quickly rsync the new files into place, run migrations, and hide the maintenance page. We used to shoot for releases with no downtime by copying the *.py files into place, and letting Django notice and re-load the *.pyc files automatically, but we ran onto some strange issues sometimes. Seems like Django continued to use some of the cached *.pyc files for a while. It's worked out better to always delete all *.pyc files before rsyncing the *.py files into place, and to always restart the Apache server just before hiding the maintenance page, so we're sure everything gets reloaded cleanly. This has also been a good idea as we've added more caching: - Template files - Fully assembled pages - DB data - etc. Hope this helps, --Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! Open Source: Without walls and fences, we need no Windows or Gates. On 4/19/16 12:12 PM, Avraham Serour
wrote:
-- 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5716820F.8000208%40bristle.com. For more options, visit https://groups.google.com/d/optout. |
- No Downtime Code Releases bliyanage
- Re: No Downtime Code Releases Avraham Serour
- Re: No Downtime Code Releases Fred Stluka
- Re: No Downtime Code Releases Avraham Serour
- Re: No Downtime Code Releases Vijay Khemlani
- Re: No Downtime Code Releases graeme
- Re: No Downtime Code Releases bliyanage
- Re: No Downtime Code Releases Alex Heyden
- Re: No Downtime Code Releases Tom Christie
- Re: No Downtime Code Releases Daniel Chimeno