Bugzilla – Attachment 57439 Details for
Bug 17610
[16.11.x] Allow the number of plack workers and max connections to be set in koha-conf.xml
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17610 - Allow the number of plack workers and max connections to be set in koha-conf.xml
Bug-17610---Allow-the-number-of-plack-workers-and-.patch (text/plain), 2.96 KB, created by
Kyle M Hall (khall)
on 2016-11-10 20:19:29 UTC
(
hide
)
Description:
Bug 17610 - Allow the number of plack workers and max connections to be set in koha-conf.xml
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-11-10 20:19:29 UTC
Size:
2.96 KB
patch
obsolete
>From 71a99660b27002a9b5972cdedf46c1443b378701 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 10 Nov 2016 19:53:30 +0000 >Subject: [PATCH] Bug 17610 - Allow the number of plack workers and max > connections to be set in koha-conf.xml > >It would be nice if we could control the number of workers and max >requests on a per instance basis, rather than the numbers being >hardcoded in the plack startup script. > >Test Plan: >1) Build a new package of Koha with this patch applied ; ) >2) Verify koha-plack still works >3) Add the following to the config section of your koha-conf.xml: > <plack_max_requests>75</plack_max_requests> > <plack_workers>4</plack_workers> >4) Stop plack >5) Start plack >6) Verify the number of works and max requests worked! >--- > debian/scripts/koha-plack | 21 ++++++++++++++++++++- > debian/templates/koha-conf-site.xml.in | 3 +++ > etc/koha-conf.xml | 3 +++ > 3 files changed, 26 insertions(+), 1 deletion(-) > >diff --git a/debian/scripts/koha-plack b/debian/scripts/koha-plack >index ed0f421..694cd07 100755 >--- a/debian/scripts/koha-plack >+++ b/debian/scripts/koha-plack >@@ -74,7 +74,18 @@ start_plack() > > _check_and_fix_perms $instancename > >- STARMANOPTS="-M FindBin --max-requests 50 --workers 2 \ >+ PLACK_MAX_REQUESTS="50" >+ PLACK_WORKERS="2" >+ >+ if [[ $(get_plack_max_requests $instancename) ]]; then >+ PLACK_MAX_REQUESTS="$(get_plack_max_requests $instancename)" >+ fi >+ >+ if [[ $(get_plack_workers $instancename) ]]; then >+ PLACK_WORKERS="$(get_plack_workers $instancename)" >+ fi >+ >+ STARMANOPTS="-M FindBin --max-requests ${PLACK_MAX_REQUESTS} --workers ${PLACK_WORKERS} \ > --user=${instancename}-koha --group ${instancename}-koha \ > --pid ${PIDFILE} \ > --daemonize \ >@@ -231,6 +242,14 @@ set_action() > fi > } > >+get_plack_max_requests() { >+ xmlstarlet sel -t -v 'yazgfs/config/plack_max_requests' "/etc/koha/sites/$1/koha-conf.xml" >+} >+ >+get_plack_workers() { >+ xmlstarlet sel -t -v 'yazgfs/config/plack_workers' "/etc/koha/sites/$1/koha-conf.xml" >+} >+ > STARMAN=$(which starman) > op="" > quiet="no" >diff --git a/debian/templates/koha-conf-site.xml.in b/debian/templates/koha-conf-site.xml.in >index 6bfe004..a792672 100644 >--- a/debian/templates/koha-conf-site.xml.in >+++ b/debian/templates/koha-conf-site.xml.in >@@ -311,5 +311,8 @@ __END_SRU_PUBLICSERVER__ > <font type="HBO">/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf</font> > </ttf> > >+ <plack_max_requests>50</plack_max_requests> >+ <plack_workers>2</plack_workers> >+ > </config> > </yazgfs> >diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml >index 1ce3c90..38a8081 100644 >--- a/etc/koha-conf.xml >+++ b/etc/koha-conf.xml >@@ -138,5 +138,8 @@ __PAZPAR2_TOGGLE_XML_POST__ > <font type="HBO">__FONT_DIR__/DejaVuSans-BoldOblique.ttf</font> > </ttf> > >+ <plack_max_requests>50</plack_max_requests> >+ <plack_workers>2</plack_workers> >+ > </config> > </yazgfs> >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17610
:
57437
|
57438
|
57439
|
57490
|
59377
|
59680
|
64699
|
68814