When I replace served file (or modify symlink) and download this file simultaneously, Apache rarely (in small fraction of percent) responds with headers from old file, but with content from new file.
I tested it on few versions of Apache 2.2 (2.2.3, 2.2.22 - Debian stable), locally and remotely, on virtual and physical machines, on different distributions (Red Hat, CentOS, Debian) - I could always reproduce it using Python script repeatedly downloading file in threads (20-200 threads) and replacing it on server from time to time (like every 100ms).
Where lies the problem? Is it Apache's fault or maybe I'm doing something wrong?
Update: I also tested Nginx, it doesn't have this problem. But in rare cases (100 times rarer than on Apache), it doesn't see the file and serves default content (404 or default page).