aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/varnish64/varnish.inc16
-rw-r--r--config/varnish64/varnish_settings.xml18
2 files changed, 32 insertions, 2 deletions
diff --git a/config/varnish64/varnish.inc b/config/varnish64/varnish.inc
index 5011d878..4bdd06ed 100644
--- a/config/varnish64/varnish.inc
+++ b/config/varnish64/varnish.inc
@@ -54,7 +54,19 @@ function sync_package_varnish() {
if($vs['listeningport'])
$listeningport = "-a :{$vs['listeningport']}";
else
- $listeningport = "-a :80";
+ $listeningport = "-a :80";
+ if($vs['minworkers'])
+ $minworkers = "{$vs['minworkers']}";
+ else
+ $minworkers = "200";
+ if($vs['maxworkers'])
+ $maxworkers = "{$vs['maxworkers']}";
+ else
+ $maxworkers = "4000";
+ if($vs['timeoutworkers'])
+ $timeoutworkers = "{$vs['timeoutworkers']}";
+ else
+ $timeoutworkers = "50";
}
$fd = fopen("/usr/local/etc/rc.d/varnish.sh", "w");
$rc_file = <<<EOF
@@ -67,7 +79,7 @@ sleep 1
{$listeningport} \
-f /var/etc/default.vcl \
{$storage_type} \
- -w 200,4000,50
+ -w {$minworkers},{$maxworkers},{$timeoutworkers}
EOF;
fwrite($fd, $rc_file);
diff --git a/config/varnish64/varnish_settings.xml b/config/varnish64/varnish_settings.xml
index 53fca92a..763a74b1 100644
--- a/config/varnish64/varnish_settings.xml
+++ b/config/varnish64/varnish_settings.xml
@@ -91,6 +91,24 @@
<description>Enter the port you would like varnish to listen on. Defaults to 80.</description>
<type>input</type>
</field>
+ <field>
+ <fielddescr>Minimum worker threads</fielddescr>
+ <fieldname>minworkers</fieldname>
+ <description>Enter the minimum number of varnish worker threads.</description>
+ <type>input</type>
+ </field>
+ <field>
+ <fielddescr>Maximum worker threads</fielddescr>
+ <fieldname>maxworkers</fieldname>
+ <description>Enter the maximum number of varnish worker threads.</description>
+ <type>input</type>
+ </field>
+ <field>
+ <fielddescr>Worker thread timeout</fielddescr>
+ <fieldname>timeoutworkers</fieldname>
+ <description>Enter the timeout time for the worker threads.</description>
+ <type>input</type>
+ </field>
</fields>
<custom_php_validation_command>
</custom_php_validation_command>