I'm not sure about the file locking Php uses, but this might be a race condition under heavy load.