I'm seeing two separate cases where there's a (random?) delay before a new or modified file appears.
The first case is my Rails development environment: I modify a code file (in vim) and save it, switch to my web browser and reload the page. The Rails server notices that something has changed and reloads. All is fine and well, except sometimes the modified file disappears for a few seconds and Rails complains about a missing file.
The second case is the Sphinx indexer in our production environment. I have a delta indexing setup - the Sphinx indexer creates new index files and merges them into the existing ones. All is fine and well, except every now and then (about once every 10 minutes) one of the new files does not exist when the indexer tries to read it - the same process that has just written it and knows for a fact that it is there.
In both cases, the file is there a few seconds later, looking smug as if nothing happened.
Can anybody explain these, or give some clues on where to look for a solution?
The development environment is running CentOS 6.3, and the filesystem I'm working on is a local ext3. The production environment is a Debian 7 (wheezy), and the Sphinx index files are on a local ext4.