Bug 35734

Summary: Message queue table lock will crash Koha
Product: Koha Reporter: Johanna Räisä <johanna.raisa>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Johanna Räisä 2024-01-09 09:38:00 UTC
Locking the message_queue table on circulation and reserves will crash Koha, if there are many circulation or/and reservation operations on running and the process_message_queue cron is processing messages. Locking a table is not a very good way to handle digest messages and active queue, this should be handled with a new message status instead.
Comment 1 Johanna Räisä 2024-01-18 10:12:44 UTC
I investigated this problem further, seems that the issue appears when there are lot of rows in the message_queue table. One of our biggest Koha had last year 1892573 message rows and it takes a while finding messages with pending status.