OPAC Can Cause Proliferation of Connected CStore Drones

Bug #1415898 reported by Jason Stephenson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
High
Unassigned
2.6
Fix Released
High
Unassigned
2.7
Fix Released
High
Unassigned

Bug Description

EG version: 2.7.1 (affects all versions with TPAC)
Rest is irrelevant

When a patrons views their current circulations in the My Account section of the TPAC, a transaction is begun to retrieve the list out of the database and avoid the cache. This transaction opens a connected session to a cstore drone. The connection is never closed causing the cstore drone to remain unusable until the session timeout time arrives (6 seconds by default).

On a busy server, this can lead to a proliferation of cstore drones doing next to nothing. In extreme cases, it can lead to the maximum number of cstore drones being in service and a failure to create more. If this happens during a particularly busy time of the day, when libraries are doing pull lists or other cstore-intensive activities, the load on the server will spike as ejabberd and other services try to respond while cstore drones are mostly ignoring connections. This has lead to the need to restart services on at least one production system.

There is potentially a similar problem in the getit_results function of the EGKPacLoader as well.

I pushed a branch, user/dyrcona/lp1415898_opac_xact_fix, to the working repo with two commits. d1c341674bbde863062726421d60d54c53eab74b fixes the issue in the My Account area of the OPAC, and 5312dd31fcd0812f90cbafaf6fa6de8ab39a1b23 fixes the problem in the KPAC. I figured I'd split it over two commits, since not everyone uses the KPAC.

Links:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dyrcona/lp1415898_opac_xact_fix

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=commitdiff;h=d1c341674bbde863062726421d60d54c53eab74b

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=commitdiff;h=5312dd31fcd0812f90cbafaf6fa6de8ab39a1b23

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Oh, and I should mention that we have been running the above code in production since Tuesday, 2015-01-27.

description: updated
tags: added: pullrequest
Revision history for this message
Bill Erickson (berick) wrote :

Confirmed and tested. Solves the problem as expected. Merged to 2.6, 2.7, and master.

Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
milestone: none → 2.8-beta
status: Confirmed → Fix Committed
assignee: Bill Erickson (berick) → nobody
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.