Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When we deploy we create a timestamped folder in a versions folder. After it's done cloning from git we unlink the symlink, and create a new one to the new versioned folder. We reload apache (not a full restart) and when we refresh the pages it takes several refreshes (sometimes for minutes) until it stops serving a mix between old and new content.

I am assuming this is due to stale apache workers, or Rackspace servers caching on file system level? (I have tried forcing the ln command to "go faster" with sync, but with no change)

So for example 1. doc_root/ -> versions/12345 2. Deployment, create 67890 folder, checkout 3. unlink doc_root 4. symlink doc_root/ -> versions/67890 5. Reload apache 6. Refresh pages for minutes and it will serve content from 12345 and 67890.

Am I missing something that I could do to ensure this doesn't happen? Is this a case against symlinks? Should we be swapping directories around with mv instead?

share|improve this question
Are you certain this is apache and not a cached page in your browser or a proxy? – Jenny D Jan 23 '14 at 9:01
Caching wouldn't explain why on one refresh we see old content, on the next new content, on yet another refresh old content. There's no cache/proxy in front of our server. – jlindenbaum Jan 23 '14 at 16:31

Your Answer


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

Browse other questions tagged or ask your own question.