Koha-clms/C4/SIP
Kyle M Hall 7dc223b30a
Bug 42547: Fix SIP performance if sip2_resource_last_modified not set in cache
In Koha, the sip2_resource_last_modified key is updated any time the SIP config is edited from the SIP2 editor in the staff interface ( institutions, accounts, system preference overrides ).

If sip2_resource_last_modified is missing from memcached, Koha SIP emits "Couldn't find sip2_resource_last_modified, considering configuration not up to date" in the logs, and fetches the entire configuration from the database, *for each request*.

This causes SIP performance to drop significantly. In my production testing with 83 institutions and 171 accounts the login message response time dropped from 0.283 seconds to 2.899 seconds.

I think the solution is pretty simple. If there is a cache miss on sip2_resource_last_modified, SIP should load the config from database as it does already, but then it should also set sip2_resource_last_modified!

Test Plan:
1) Apply this patch
2) Prove t/db_dependent/Koha/SIP2/SIP2ModuleMigration.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:20 -06:00
..
ILS Bug 23909: Extend SIP to distinguish pending vs waiting holds 2026-05-01 11:04:19 -06:00
Sip Bug 42547: Fix SIP performance if sip2_resource_last_modified not set in cache 2026-05-18 09:30:20 -06:00
ILS.pm Bug 41369: SIP payments have no branchcode 2025-12-17 13:24:30 -07:00
Logger.pm Bug 40680: Move EXPORT_OK right after Modern::Perl 2025-12-01 08:33:56 -07:00
Makefile
…
README Bug 15253: Rename syslog() to siplog() 2020-05-12 11:46:46 +01:00
SIPServer.pm Bug 41811: SIP server will inadvertently remove non-alphanumeric characters from the end of a message 2026-02-25 07:37:03 -07:00
Sip.pm Bug 40675: Fix SIP message corruption from embedded line endings 2025-09-19 08:42:47 -06:00
Trapper.pm Bug 39911: Remove redundant warn 2025-06-13 13:09:41 -06:00

README

README for Open NSIP 3M-SIP Server

DEPENDENCIES

SIPServer is written entirely in Perl, but it require these CPAN
perl modules to run:

     Net::Server - The SIP server is a Net::Server::Prefork server
     XML::LibXML
     XML::Parser
     XML::Simple - for parsing the config file
     UNIVERSAL::require - for loading the correct ILS interface module
     Clone - for running the test cases

LOGGING

SIPServer uses Koha::Logger for status and debugging messages.