Bug 31072 - Remove direct CSV export in itemsearch.pl
Summary: Remove direct CSV export in itemsearch.pl
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: 21.11
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-30 12:28 UTC by Simon Hohl
Modified: 2023-10-25 10:05 UTC (History)
1 user (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 Simon Hohl 2022-06-30 12:28:00 UTC
I am not 100% sure if this is something you are considering in need of fixing, but anyway: We just had a colleague crashing our system by running multiple searches with cgi-bin/koha/catalogue/itemsearch.pl. 

The search scope was rather broad (a lot of entries) and the output option had been set to CSV (without going to the "screen" view). Because the interface did not give any feedback after starting the search (it just indicated "website loading"), the colleague refreshed the browser window and started another search. The result: We had 2 processes running on the server, using 8gb of RAM each, thus causing our server to grind to a halt.
Comment 1 Lari Taskula 2023-10-25 10:05:24 UTC
We also experienced a similar problem with itemsearch.pl when attempting to export tens of thousands of items as CSV in multiple processes, probably refreshing the page like in Simon's case, resulting in Koha becoming completely unresponsive.

When selecting "Screen" as output then the response is fast and it works as expected. Even barcodes work fine.

Perhaps limit the number of csv-exportable results? Or have the server respond immediately, saying the csv is being generated and implementing a way to serve such large csv to the user.