[Bug 42358] New: Add support to Plack::Middleware::SizeLimit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42358 Bug ID: 42358 Summary: Add support to Plack::Middleware::SizeLimit Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org It seems like Plack::Middleware::SizeLimit would be useful to allow higher max requests while keeping memory usage down. It should be implemented in an optional manner. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42358 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42358 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42643 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42643 [Bug 42643] [OMNIBUS] Assorted performance and stability work -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42358 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |43035 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43035 [Bug 43035] [OMNIBUS] System resource management and tracking -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42358 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43035 Depends on|43035 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43035 [Bug 43035] [OMNIBUS] System resource management and tracking -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42358 --- Comment #1 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 203741 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203741&action=edit Bug 42358: WIP Copy the new section to /etc/koha/sites/kohadev/plack.psgi edit /etc/koha/sites/kohadev/koha-conf.xml add the new variable: <plack_max_memory>4096</plack_max_memory> ./debian/scripts/koha-plack --restart kohadev tail the logs and try selecting all items in the item search, or other big actions note that some processes will auto kill - I didn't actually see failures in the interface oddly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42358 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #2 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- https://metacpan.org/pod/Plack::Middleware::SizeLimit -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42358 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|kyle@bywatersolutions.com |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42358 --- Comment #3 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 203752 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203752&action=edit Bug 42358: Add option to use Plack::Middleware::SizeLimit This patch implements: https://metacpan.org/pod/Plack::Middleware::SizeLimit This will terminate the starman workers when they grow above a certain size. The limits can be configured in the koha-conf.xml and should have no effect if not set 0 - sudo cpanm Plack::Middleware::SizeLimit 1 - Copy the new section to /etc/koha/sites/kohadev/plack.psgi enable_if { $ENV{PLACK_MAX_MEMORY} } SizeLimit => ( max_unshared_size_in_kb => $ENV{PLACK_MAX_MEMORY}, # Available settings, documentation suggests on the first is needed # min_shared_size_in_kb => '8192', # 8MB # max_process_size_in_kb => '16384', # 16MB check_every_n_requests => 2, log_when_limits_exceeded => 1, callback => sub { my ($size, $share, $unshared) = @_; # Nothing here yet }, ); 2 - Edit /etc/koha/sites/kohadev/koha-conf.xml add the new variable: <plack_max_memory>4096</plack_max_memory> 3 - ./debian/scripts/koha-plack --restart kohadev 4 - tail the logs 5 - perform an item search for barcode:% 6 - Note in the plack-intranet-error.log that the process is killed 7 - Confirm the page loads successfully 8 - Try the about pages and other processes that use momery, confirm worker returns the page and then is killed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42358 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #203741|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42358 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com, | |julian.maurice@biblibre.com | |, | |martin.renvoize@openfifth.c | |o.uk, tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42358 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42358 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #203752|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42358 --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 204180 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204180&action=edit Bug 42358: Add option to use Plack::Middleware::SizeLimit This patch implements: https://metacpan.org/pod/Plack::Middleware::SizeLimit This will terminate the starman workers when they grow above a certain size. The limits can be configured in the koha-conf.xml and should have no effect if not set 0 - sudo cpanm Plack::Middleware::SizeLimit 1 - Copy the new section to /etc/koha/sites/kohadev/plack.psgi enable_if { $ENV{PLACK_MAX_MEMORY} } SizeLimit => ( max_unshared_size_in_kb => $ENV{PLACK_MAX_MEMORY}, # Available settings, documentation suggests on the first is needed # min_shared_size_in_kb => '8192', # 8MB # max_process_size_in_kb => '16384', # 16MB check_every_n_requests => 2, log_when_limits_exceeded => 1, callback => sub { my ($size, $share, $unshared) = @_; # Nothing here yet }, ); 2 - Edit /etc/koha/sites/kohadev/koha-conf.xml add the new variable: <plack_max_memory>4096</plack_max_memory> 3 - ./debian/scripts/koha-plack --restart kohadev 4 - tail the logs 5 - perform an item search for barcode:% 6 - Note in the plack-intranet-error.log that the process is killed 7 - Confirm the page loads successfully 8 - Try the about pages and other processes that use momery, confirm worker returns the page and then is killed Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org