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

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?

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
thanks a lot - this is how I thought it would be – Stephan Sep 15 '11 at 4:31

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.