]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip: Deny requests when threadpool queue is backed up. 08/1608/2
authorMark Michelson <mmichelson@digium.com>
Wed, 11 Nov 2015 23:11:53 +0000 (17:11 -0600)
committerMark Michelson <mmichelson@digium.com>
Thu, 12 Nov 2015 16:41:33 +0000 (11:41 -0500)
commit287cab1a53e0011626442b4bbc2b27d7eceb1e8c
treec84f28177f4f2219427fafa61b163ba988cc7fa1
parentd073cb4b6d1b3e5638282cbeabbfa3adb981fde9
res_pjsip: Deny requests when threadpool queue is backed up.

We have observed situations where the SIP threadpool may become
deadlocked. However, because incoming traffic is still arriving, the SIP
threadpool's queue can continue to grow, eventually running the system
out of memory.

This change makes it so that incoming traffic gets rejected with a 503
response if the queue is backed up too much.

Change-Id: I4e736d48a2ba79fd1f8056c0dcd330e38e6a3816
include/asterisk/res_pjsip.h
include/asterisk/taskprocessor.h
include/asterisk/threadpool.h
main/taskprocessor.c
main/threadpool.c
res/res_pjsip.c
res/res_pjsip/pjsip_distributor.c