Bug 15418

Summary: Switch Net::Server personality in sipserver to Fork
Product: Koha Reporter: Colin Campbell <colin.campbell>
Component: SIP2Assignee: Martin Renvoize <martin.renvoize>
Status: RESOLVED WONTFIX QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: colin.campbell, dcook, katrin.fischer, srdjan
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Proposed patch

Description Colin Campbell 2015-12-23 10:44:34 UTC
Experience showed that using the pre-fork personality of Net::Server was using up resources for no benefit and that configuring the numbers in the config could be confusing. For the past year I've been running a a version using the Fork personality at our sites which use sipserver heavily both for self check and user authentication. Results seem more stable running for months and freeing resourses when connections close, with only sendig a SIGHUP to the controlling process to reread config and close active children.
This merges the version we've been running back into the standard.

Testing : As opposed to the pre-fork behaviour this will start up a single controlling instance to listem on the specified ports. Child processs will be created to handle handle sip connections and shutdown when the client closes the socket
Comment 1 Colin Campbell 2015-12-23 11:01:05 UTC
Created attachment 45944 [details] [review]
Proposed patch
Comment 2 Srdjan Jankovic 2016-06-06 06:12:31 UTC
* read_SIP_packet() should be removed if not used any more
* syslog should get SIPServer::read_request rather than "read_SIP_packet"

Also, not sure if LOG_INFO is appropriate level.
Comment 3 Katrin Fischer 2017-10-15 09:54:57 UTC
Patch doesn't apply. Opting for 'Failed QA' because of Srdjan's comment#2.

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 15418 Use Fork Net::Server personality for sip
Using index info to reconstruct a base tree...
M	C4/SIP/SIPServer.pm
M	etc/SIPconfig.xml
Falling back to patching base and 3-way merge...
Auto-merging etc/SIPconfig.xml
CONFLICT (content): Merge conflict in etc/SIPconfig.xml
Auto-merging C4/SIP/SIPServer.pm
CONFLICT (content): Merge conflict in C4/SIP/SIPServer.pm
Failed to merge in the changes.
Patch failed at 0001 Bug 15418 Use Fork Net::Server personality for sip
The copy of the patch that failed is found in:
   /home/vagrant/kohaclone/.git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Proposed-patch-pNkHlx.patch
Comment 4 Katrin Fischer 2023-08-28 20:19:05 UTC
An old patch from Colin, Martin, can you review if this should remain open?