Bugzilla – Attachment 192449 Details for
Bug 41767
Plack backlog parameter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41767: Plack backlog parameter
Bug-41767-Plack-backlog-parameter.patch (text/plain), 2.62 KB, created by
Andreas Jonsson
on 2026-02-04 11:06:49 UTC
(
hide
)
Description:
Bug 41767: Plack backlog parameter
Filename:
MIME Type:
Creator:
Andreas Jonsson
Created:
2026-02-04 11:06:49 UTC
Size:
2.62 KB
patch
obsolete
>From 04ecc3cef1822cfab63a83b624e3f5591f61e8b1 Mon Sep 17 00:00:00 2001 >From: Andreas Jonsson <andreas.jonsson@kreablo.se> >Date: Wed, 4 Feb 2026 11:55:26 +0100 >Subject: [PATCH] Bug 41767: Plack backlog parameter > >Set a low default --backlog parameter for starman to allow for faster >recovery when system becomes overloaded. Also expose configuration >parameter for tuning. > >Test plan: > >* At the command line verify that the parameter "--backlog 50" is > present for starman processes, provided that --max-requests 50 > --workers 2: > > ps aux | grep starman >* Edit /etc/koha/sites/kohadev/koha-conf.xml and add > <plack_backlog>157</plack_backlog> (e.g., next to <plack_workers>). >* Restart plack: > > koha-plack --restart kohadev >* Verify that the --backlog parameter has changed accordingly >--- > debian/scripts/koha-plack | 4 +++- > debian/templates/koha-conf-site.xml.in | 3 +++ > 2 files changed, 6 insertions(+), 1 deletion(-) > >diff --git a/debian/scripts/koha-plack b/debian/scripts/koha-plack >index 9a31d419e42..cfbb7f771a2 100755 >--- a/debian/scripts/koha-plack >+++ b/debian/scripts/koha-plack >@@ -89,6 +89,8 @@ start_plack() > [ -z $PLACK_MAX_REQUESTS ] && PLACK_MAX_REQUESTS="50" > PLACK_WORKERS=$(run_safe_xmlstarlet $instancename plack_workers) > [ -z $PLACK_WORKERS ] && PLACK_WORKERS="2" >+ PLACK_BACKLOG=$(run_safe_xmlstarlet $instancename plack_backlog) >+ [ -z $PLACK_BACKLOG ] && PLACK_BACKLOG=$(( $PLACK_WORKERS * $PLACK_MAX_REQUESTS / 2 )) > > instance_user="${instancename}-koha" > >@@ -100,7 +102,7 @@ start_plack() > daemonize="--daemonize" > logging="--access-log /var/log/koha/${instancename}/plack.log \ > --error-log /var/log/koha/${instancename}/plack-error.log" >- max_requests_and_workers="--max-requests ${PLACK_MAX_REQUESTS} --workers ${PLACK_WORKERS}" >+ max_requests_and_workers="--max-requests ${PLACK_MAX_REQUESTS} --workers ${PLACK_WORKERS} --backlog ${PLACK_BACKLOG}" > > # Enable debugger? > if [ "$debugger" = "yes" ] && [ "$environment" = "development" ]; then >diff --git a/debian/templates/koha-conf-site.xml.in b/debian/templates/koha-conf-site.xml.in >index 0e07af36d8f..143dc6efaab 100644 >--- a/debian/templates/koha-conf-site.xml.in >+++ b/debian/templates/koha-conf-site.xml.in >@@ -339,6 +339,9 @@ __END_SRU_PUBLICSERVER__ > <!-- Configuration for Plack --> > <plack_max_requests>50</plack_max_requests> > <plack_workers>2</plack_workers> >+ <!-- The parameter plack_backlog is the size of the request backlog queue. --> >+ <!-- The default is (max_requests*workers)/2 --> >+ <!-- <plack_backlog>50</plack_backlog> --> > > <!-- Configuration for X-Forwarded-For --> > <!-- >-- >2.39.5
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 41767
: 192449