Bug 19811 - Preventing runaway processes bringing down Koha
Summary: Preventing runaway processes bringing down Koha
Status: RESOLVED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: 17.05
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-14 11:28 UTC by Ray Delahunty
Modified: 2023-10-01 15:13 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ray Delahunty 2017-12-14 11:28:45 UTC
We just had a complete Koha outage which we believe was caused by 150+ requests to /cgi-bin/koha/circ/returns.pl sent simultaneously. Apparently this could have been caused by someone on the issue desk accidentally pressing the resend key. Our server support people have to kill the processes, presumably via the command line. 
It would be very easy to trigger repeated calls to returns.pl (and I guess other scripts) by accidently resting a book (or whatever) on the edge of the keyboard, catching the Enter key. Just now I was able to bring down our test system (both intranet and OPAC) by merely holding down the enter key (using returns.pl) for maybe a maximum of 5-7 seconds. This a serious vulnerability, where a momentary lapse of care with a book on a keyboard can crash the Koha system. 

Ray Delahunty
University of the Arts London
Comment 1 Ray Delahunty 2017-12-15 08:37:23 UTC
This may have been due in part to us having an underpowered Koha server. Apparently there is a firewall rule that should stop more than 200 requests from a single IP being accepted. I was running a 5,000 record import at the same time the keyboard key was left depressed, and the suggestion is that the load on the server from this import was high, and the c.150 simultaneous requests (below the 200 threshold) was enough to crash the server. We are upgrading the server within the next 24 hours, including adding a second processor.

Ray Delahunty
University of the Arts London
Comment 2 Katrin Fischer 2023-10-01 15:13:28 UTC
I think overall this sounds more like a system administration/hardware issue. So something that should likely be solved outside of Koha. Please re-open if you disagree.