Problem: All http-Related Services (UMC, Kopano, OX,...) Are Very Sluggish

Problem

All http related services are very slow and sluggish. “top” does not give any evidence regarding CPU or high load.

Environment

When restarting apache service through “systemctl restart apache2” the service works fine for a minute or so and then falls back to the sluggish behavior.
Even authorization takes much more time as expected. No hints can be found in any logfiles and even openssl queries takes a noticeable amount of time.

Example:

root@master:~# time echo "
" | openssl s_client -state -debug -connect host.domain.com:443
CONNECTED(00000003)
SSL_connect:before SSL initialization
[...]
|real|1m5,130s|
|---|---|
|user|0m0,008s|
|sys|0m0,004s|

When querying the number of apache processes it will give a high number of processes close to the configured default maximum (150):

ps ax | grep apache2| wc -l
149

Solution

Increase the number of maximum clients allowed for apache.

ucr set apache2/maxclients=200
systemctl restart apache2
Mastodon