Bug 17610 - Allow the number of plack workers and max connections to be set in koha...
authorPongtawat C <pongtawat@punsarn.asia>
Wed, 28 Jun 2017 10:58:24 +0000 (17:58 +0700)
committerKatrin Fischer <katrin.fischer.83@web.de>
Wed, 15 Nov 2017 20:25:34 +0000 (21:25 +0100)
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

debian/scripts/koha-plack
debian/templates/koha-conf-site.xml.in
etc/koha-conf.xml

index 5d2799a..5e1fc9c 100755 (executable)
@@ -74,7 +74,12 @@ start_plack()
 
     _check_and_fix_perms $instancename
 
-    STARMANOPTS="-M FindBin --max-requests 50 --workers 2 \
+    PLACK_MAX_REQUESTS=$(run_safe_xmlstarlet $instancename plack_max_requests)
+    [ -z $PLACK_MAX_REQUESTS ] && PLACK_MAX_REQUESTS="50"
+    PLACK_WORKERS=$(run_safe_xmlstarlet $instancename plack_workers)
+    [ -z $PLACK_WORKERS ] && PLACK_WORKERS="2"
+
+    STARMANOPTS="-M FindBin --max-requests ${PLACK_MAX_REQUESTS} --workers ${PLACK_WORKERS} \
                  --user=${instancename}-koha --group ${instancename}-koha \
                  --pid ${PIDFILE} \
                  --daemonize \
index 7ba39f3..9b9af44 100644 (file)
@@ -315,6 +315,10 @@ __END_SRU_PUBLICSERVER__
     <font type="HBO">/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf</font>
  </ttf>
 
+ <!-- Configuration for Plack -->
+ <plack_max_requests>50</plack_max_requests>
+ <plack_workers>2</plack_workers>
+
  <elasticsearch>
      <server>localhost:9200</server>
      <index_name>koha___KOHASITE__</index_name>
index a30eb35..d2d9119 100644 (file)
@@ -142,5 +142,9 @@ __PAZPAR2_TOGGLE_XML_POST__
     <font type="HBO">__FONT_DIR__/DejaVuSans-BoldOblique.ttf</font>
  </ttf>
 
+ <!-- Configuration for Plack -->
+ <plack_max_requests>50</plack_max_requests>
+ <plack_workers>2</plack_workers>
+
 </config>
 </yazgfs>