]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip: Deny requests when threadpool queue is backed up. 07/1607/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:27 +0000 (11:41 -0500)
commit2f9cb7d62bf1ee2d3f7d878607d2d1eb9995dd03
treed4459c8c979169eaa11d01bd62b01c4ff3da2421
parent7ae22c26901abede6e4542aa6ccd94151f4ca134
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