Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

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

share|improve this answer
    
Setting sendfile off solved this issue, thank you @imapollo –  user1630391 Apr 25 '13 at 9:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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