3

I'm trying to automate my deployment process and I'm having this strange issue. Every new version of my web app is placed in /var/www/releases/{timestamp}. After I execute git clone into that directory I make a symlink to /var/www/current. Then I execute service nginx reload. The approach is used by many deployment tools and is well thought.

The problem is that when I go to a web browser to see the changes and hit refresh multiple times, I can see both releases (current and previous) alternating for several seconds/minutes. After a while it stabilizes on the current version only.

Does anybody know what might be causing this issue?

Thank you

2

There may be some cache in your nginx. Have you turned on your nginx cache? This thread may help https://stackoverflow.com/questions/6236078/how-to-clear-the-cache-of-nginx

  • 1
    Setting sendfile off solved this issue, thank you @imapollo – user1630391 Apr 25 '13 at 9:58
  • I've set sendfile off in the server directive, restarted nginx and still have this problem – cleanunicorn May 31 '15 at 5:34

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.