aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgit-marijus <mario@mariovavti.com>2015-11-27 14:04:59 +0100
committergit-marijus <mario@mariovavti.com>2015-11-27 14:04:59 +0100
commit6875a540ec9df17dad7f1ee7b003910b6843a683 (patch)
tree27e512705c995e681fbb99b7d8daa846ee7c2e65
parente569f5d6ebc44b8bd6011e8ec2db757188b51c48 (diff)
parent4c4db6f73cc6702d26fbbea85ff45eb91fb20a0c (diff)
downloadvolse-hubzilla-6875a540ec9df17dad7f1ee7b003910b6843a683.tar.gz
volse-hubzilla-6875a540ec9df17dad7f1ee7b003910b6843a683.tar.bz2
volse-hubzilla-6875a540ec9df17dad7f1ee7b003910b6843a683.zip
Merge pull request #193 from zzottel/master
added info about Apache settings to avoid Apache running wild
-rw-r--r--install/INSTALL.txt41
1 files changed, 41 insertions, 0 deletions
diff --git a/install/INSTALL.txt b/install/INSTALL.txt
index c81510522..25852497b 100644
--- a/install/INSTALL.txt
+++ b/install/INSTALL.txt
@@ -341,3 +341,44 @@ This is obvious as soon as you notice that the cron uses proc_open to
execute php-scripts that also use proc_open, but it took me quite some time to
find that out. I hope this saves some time for other people using suhosin with
function blacklists.
+
+#####################################################################
+- Apache processes hanging, using as much CPU as they can
+#####################################################################
+
+This seems to happen sometimes if you use mpm_prefork and the PHP process
+started by Apache cannot get database access.
+
+Consider the following settings:
+
+In /etc/apache2/mods-enabled/mpm_prefork.conf (Debian, path and file name
+may vary depending on your OS and distribution), set
+
+ GracefulShutdownTimeout 300
+
+This makes sure that Apache processes that are running wild will not do so
+forever, but will be killed if they didn't stop five minutes after a
+shutdown command was sent to the process.
+
+If you expect high load on your server (public servers, e.g.), also make
+sure that Apache will not spawn more processes than MySQL will accept
+connections.
+
+In the default Debian configuration, in
+/etc/apache2/mods-enabled/mpm_prefork.conf the maximum number of workers
+is set to 150:
+
+ MaxRequestWorkers 150
+
+However, in /etc/mysql/my.cnf the maximum number of connection is set to
+100:
+
+ max_connections = 100
+
+150 workers are a lot and probably too much for small servers. However you
+set those values, make sure that the number of Apache workers is smaller
+than the number of connections MySQL accepts, leaving some room for other
+stuff on your server that might access MySQL, and Hubzilla's poller which
+needs MySQL access, too. A good setting for a medium-sized hub might be to
+keep MySQL's max_connections at 100 and set mpm_prefork's
+MaxRequestWorkers to 70.