apache, there are two mechanisms to prevent two threads from reading and writing to the same common resource (such as global variables) at the same time.
one is file, and the other is posixsem
installing apache, with apt defaults to using file
envvars:21:export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
apache2.conf:74:-sharpMutex file:$ {APACHE_LOCK_DIR} default
when apache dies because the process is insufficient,
couldn"t grab the accept mutex
there are three solutions:
1 shortens the time spent on each request (modify code, optimize sql)
2 modify the settings of the process,
/ etc/apache2/mods-enabled/mpm_prefork.conf (default is prefork mode)
3 the mechanism for modifying Mutex ( case )
the first two are easy to understand, but what is the third one?
if Mutex posixsem has obvious advantages, why is it installed with file by default?