From 77cc4c104f68f5cdab8dcf7c35d68608bacbdaad Mon Sep 17 00:00:00 2001 From: Pongtawat C Date: Wed, 28 Jun 2017 17:58:24 +0700 Subject: [PATCH] Bug 17610 - Allow the number of plack workers and max connections to be set in koha-conf.xml Signed-off-by: Josef Moravec Conflicts: debian/templates/koha-conf-site.xml.in --- debian/scripts/koha-plack | 7 ++++++- debian/templates/koha-conf-site.xml.in | 9 +++++++++ etc/koha-conf.xml | 4 ++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/debian/scripts/koha-plack b/debian/scripts/koha-plack index 0d49c937f2..f562b16e40 100755 --- a/debian/scripts/koha-plack +++ b/debian/scripts/koha-plack @@ -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 \ diff --git a/debian/templates/koha-conf-site.xml.in b/debian/templates/koha-conf-site.xml.in index 7994e0bd9f..3a0cdc12a2 100644 --- a/debian/templates/koha-conf-site.xml.in +++ b/debian/templates/koha-conf-site.xml.in @@ -310,5 +310,14 @@ __END_SRU_PUBLICSERVER__ /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf + + 50 + 2 + + + localhost:9200 + koha___KOHASITE__ + + diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml index 79b9d5241c..6fb2e59795 100644 --- a/etc/koha-conf.xml +++ b/etc/koha-conf.xml @@ -140,5 +140,9 @@ __PAZPAR2_TOGGLE_XML_POST__ __FONT_DIR__/DejaVuSans-BoldOblique.ttf + + 50 + 2 + -- 2.39.5