Good day and night.
There are several servers working in conjunction:
debian 8 + nginx (front-end) apache2 itk (back-end) + php7 dotdeb batch.
Opcache settings in php.ini
opcache.max_accelerated_files=10000 opcache.memory_consumption=256 opcache.interned_strings_buffer=16 opcache.enable_cli=1 Periodically, apache hangs on any of several servers, it only helps to restart it. The nature of the hangs is as follows. Randomly and at random times, all apache processes begin to sleep (sleep state), while there is a sharp increase in the number of apache processes that reach the limit, we end up with 200 apache processes from the user www, who are just waiting for their 200 different user itk потомков , and these descendants, in turn, are waiting for F_WRLK on ZendSem , who are waiting for what is not clear, and if you try to open any site from any user, it will not work and after a long wait - the 504-я ошибка apache . In the normal, even in a very loaded state, the number of processes is no more than 50.
If we consider the descendant closer, we have this:
strace -p 24209 Process 24209 attached fcntl(2981, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1} 2981 descriptor points to:
apache2 24209 user1213 2981u REG 253,0 0 22074361 /tmp/.ZendSem.rz9P8a (deleted) And so with each process.
opcache.enable = 0 - it seems to solve the problem, random hangs disappear, but then the meaning is lost and it is impossible to use opcache.
/ tmp is not a separate partition on the system, enough disk space is an SSD.
Can someone with this, too, encountered and there are any ways to solve this problem?