I am running an Apache 2.2.4 on Windows 64bit using the local NTFS file system. I enabled the Mmap option and noticed that Apache seems to acquire a write lock and hold onto it for a long period. In my example it is serving a 2MB XML file.
Unfortunately I need another process to be able to update this XML file periodically but the lock will make it impossible. As soon as I disable MMap the writing to the XML file works well.
Can you point me in the right direction to learn more about MMap and why it acquires the lock and how to enable it to allow the file to be updated by a second process?
MMap maps the file into memory. On Windows, you cannot modify a file that is mapped into memory. If you need to modify the file, and can't restart the server to do so, you can't use MMap.
Note that the documentation for MMap points out that, even if you can modify the file (e.g., on Unix) you need to restart the server whenever the file changes.