https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42664
--- Comment #1 from Kyle M Hall (khall) <[email protected]> --- Created attachment 199374 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199374&action=edit Bug 42664: Reload SIP2 configuration in every worker process SIP2 accounts/institutions are stored in the database and the SIP server is supposed to reload its configuration when they change. In practice, after adding or editing a SIP2 account, most SIP worker processes keep serving the old configuration (e.g. new accounts get "SIP access not authorized") until the SIP server is restarted ( I tested multiple times over 30 minutes ). There seem to be two issues: * L1 cache flushed too late. process_request() calls _config_up_to_date() before Koha::Caches->flush_L1_caches(). The SIP parent reads sip2_resource_last_modified into its own L1 cache at startup and never flushes it. Every worker inherits that stale L1, so a worker's first connection compares against the startup-era value instead of the current shared value. * sip2_config_read_timestamp is stored in the shared (memcached) cache, but the configuration it tracks is per-process. When one worker reloads the config from the database, it bumps the shared timestamp, so every other worker then evaluates as "up to date" and never reloads its own stale in-memory config. Test Plan: 1) Configure the SIP server with several worker processes (e.g. set min_servers and max_servers to 5) and confirm an existing SIP2 account works 2) Add a new SIP2 account in the staff interface 3) Without restarting the SIP server, test the new account with misc/sip_cli_emulator.pl 4) Note the login fails 5) Apply this patch 6) Restart all the things! 7) Add another new SIP2 account 8) Without restarting the SIP server test this new account with sip_cli_emulator.pl 9) Note that the new account works! 10) prove t/db_dependent/SIP/SIPServer.t -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
