Koha SIP2 server doesn't handle the situation where a client unexpectedly closes socket, this leads to the SIP2 server processes being killed and therefore SIP2 service being unavailable. sip-error.log when this happens: koha3-koha-sip: client (pid 1181) killed by signal 13, stopping More info on this issue I found from the perl website manual (https://perldoc.perl.org/perlipc): "Be careful to check the return values from both open() and close(). If you're writing to a pipe, you should also trap SIGPIPE. [...]" Another problem we have is that the koha-common service doesn't start the process if it gets killed, but let's focus here only on the SIGPIPE issue. This has happened now 2 times in around 1 month period on our Koha SIP instances.
Would the following change work? diff --git a/C4/SIP/SIPServer.pm b/C4/SIP/SIPServer.pm index 8d5be71624..36d7606b0b 100644 --- a/C4/SIP/SIPServer.pm +++ b/C4/SIP/SIPServer.pm @@ -28,6 +28,8 @@ use base qw(Net::Server::PreFork); use constant LOG_SIP => "local6"; # Local alias for the logging facility +$SIG{PIPE} = "IGNORE"; + # # Main # not really, since package SIPServer #
Joonas, by any chances, did you try what I suggested in the previous comment?
(In reply to Jonathan Druart from comment #2) > Joonas, by any chances, did you try what I suggested in the previous comment? I have not tried it but it should fix the problem at least cosmetically. I need to investigate what side effects it will have first if any, for example whether it will cause a process to hang and when there is a max sip server processes defined will we run out of those after a period of time.
This hasn't happened in a long time and I don't know if it happens anymore with latest master. I think this could be closed.