Hedonil has uploaded a new change for review.
https://gerrit.wikimedia.org/r/148637
Change subject: lighttpd-starter: Update default settings to oversome some
issues. Bug: 68431 hange-Id: I17ef551fd75dabb60c5c47b42eb7644109acad29i
......................................................................
lighttpd-starter: Update default settings to oversome some issues. Bug: 68431
hange-Id: I17ef551fd75dabb60c5c47b42eb7644109acad29i
Change-Id: I7e56c7db8c16ecb37974b9ef2a4cf248c21b8fd3
---
M modules/toollabs/files/lighttpd-starter
1 file changed, 15 insertions(+), 13 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/37/148637/1
diff --git a/modules/toollabs/files/lighttpd-starter
b/modules/toollabs/files/lighttpd-starter
index 098c102..3ab5dcf 100755
--- a/modules/toollabs/files/lighttpd-starter
+++ b/modules/toollabs/files/lighttpd-starter
@@ -32,10 +32,6 @@
fi
spool="/var/run/lighttpd"
runbase="$spool/$tool"
-workers=5
-if [ -r "/data/project/.system/config/$tool.workers" ]; then
- workers=$(cat "/data/project/.system/config/$tool.workers")
-fi
if [ "$home" = "" -o ! -d "$home/public_html" ]; then
echo "$1 does not have a public_html" >&2
@@ -65,9 +61,8 @@
server.errorlog = "$home/error.log"
server.breakagelog = "$home/error.log"
server.follow-symlink = "enable"
-server.max-connections = $[$workers*4]
-server.max-keep-alive-idle = 60
-server.max-worker = $workers
+server.max-connections = 300
+server.event-handler = "linux-sysepoll"
server.stat-cache-engine = "fam"
ssl.engine = "disable"
@@ -88,28 +83,35 @@
".pyc" => "/usr/bin/python",
)
+EOF
+
+cat <<EOF >$runbase-php.conf~
+
fastcgi.server += ( ".php" =>
((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket.$tool",
- "max-procs" => 1,
+ "max-procs" => 2,
"bin-environment" => (
- "PHP_FCGI_CHILDREN" => "4",
- "PHP_FCGI_MAX_REQUESTS" => "10000"
+ "PHP_FCGI_CHILDREN" => "2",
+ "PHP_FCGI_MAX_REQUESTS" => "500"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable",
- "allow-x-send-file" => "enable"
- ))
+ "allow-x-send-file" => "enable",
+ ))
)
-
EOF
/usr/share/lighttpd/create-mime.assign.pl >>$runbase.conf~
+
if [ -r $home/.lighttpd.conf ]; then
cat $home/.lighttpd.conf >>$runbase.conf~
+ if [[ ! $(cat "$home/.lighttpd.conf" | grep -P '^(?:[ \t]*fastcgi.server[
\t\+\(=]+".php"|#no-default-php)') ]]; then
+ cat $runbase-php.conf~ >>$runbase.conf~
+ fi
fi
mv $runbase.conf~ $runbase.conf
--
To view, visit https://gerrit.wikimedia.org/r/148637
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e56c7db8c16ecb37974b9ef2a4cf248c21b8fd3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hedonil <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits