[Koha-bugs] [Bug 28320] SIP SC Status message should check the DB connection

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 13 13:09:04 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28320

--- Comment #6 from Nick Clemens <nick at bywatersolutions.com> ---
(In reply to Martin Renvoize from comment #5)
> I should have commented on the bug instead of asking Nick/Kyle directly.. I
> agree, the die feels weird and I'm surprised the db connection isn't retried.

(In reply to David Cook from comment #3)
> What happens with that die()? Does that crash the server or just severs the
> connection?

The die simply kills the current connection, the server keeps running and can
be reconnected to, to test:
 1 - telnet localhost 6001
 2 - input: 9300CNterm1|COterm1|CPCPL|
 3 - Should get a  94 response
 4 - Stop the DB in another terminal - docket stop koha_db_1
 5 - input to telnet: 9900302.00
 6 - "Connection closed by foreign host."
 7 - Start the DB
 8 - repeat 1-3
 9 - input to telnet: 9900302.00
10 - You get a 98 response

The DB connection should be retried, and generally is:
 1 - telnet localhost 6001
 2 - input: 9300CNterm1|COterm1|CPCPL|
 3 - Should get a  94 response
 4 - In another terminal: sudo koha-mysql kohadev
 5 - SHOW FULL PROCESSLIST;
 6 - You should see a connection that represents your SIP session above
 7 - You can send a 99 SC status to reset the sleep/time so you can identify
which one is your sip connection
    input to telnet: 9900302.00
 8 - Once you have identified, in MySQL, kill the correct prcoess number:
    KILL 3
 9 - Send the 99 again
10 - The DB reconnects and continues without interrupting the SIP session


What we have seen is that for long standing SIP sessions, the DB won't
reconnect gracefully. In these cases the SC statuses keep reporting connection,
but the next checkin fails. After that failure the DB may reconnect and
continue, but numbers of items can pass through the AMH/Self check without
checking in. Pinging the DB connection eliminates the issue, as does a restart
of the SIP server by forcing new connections. In the case where the SC status
would fail/die, the machines reconnect to the SIP server, and we fail a status
message rather than a checkin

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list