mod_rewrite creates a global mutex and serializes writes to the log file (if one is configured).
Maybe I'm being stupid here, but why is that? It seems to be superfluous - it uses a single apr_file_write() to write a log entry, so operates under exactly the same atomicity assumptions as mod_log_config. Likewise, it uses a process-global apr_file_t * object which is used in the same way in mod_log_config, so must work in threaded servers perfectly well. The code seems to date back to 1.3, where mod_rewrite uses an file-level lock (fcntl/flock) in the same place; that code morphed into a different kind of APR lock over the ages for no obvious reason. I propose to remove the locking unless anybody objects. Regards, Joe