[asterisk-bugs] [JIRA] (ASTERISK-29505) res_pjsip_registrar: Expires all contacts from realtime table, even if table is shared across multiple servers

Andrew Yager (JIRA) noreply at issues.asterisk.org
Thu Jul 1 07:33:33 CDT 2021


    [ https://issues.asterisk.org/jira/browse/ASTERISK-29505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255516#comment-255516 ] 

Andrew Yager commented on ASTERISK-29505:
-----------------------------------------

probably a useful note is that none of those contacts are presently registered actively to this server, so each of those listed expirations should probably not have been processed by this server. Changing this would probably also improve the stasis bus performance as there would be less state of things to check.

> res_pjsip_registrar: Expires all contacts from realtime table, even if table is shared across multiple servers
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-29505
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29505
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip_registrar
>    Affects Versions: 18.4.0, 18.5.0
>            Reporter: Andrew Yager
>
> In a multi-server environment with PJSIP using realtime tables, each asterisk server validates and expires all contacts, even if the server is not the active server (based on the systemname).
> Each server with access to the contacts table will independently try to expire contacts at expiration time.
> This has the effect of creating frequent deadlocks on MySQL environments in high volume contact environments (maybe around 1500+) unnecessarily.
> While the specific behaviour that is here is probably complex, it seems that:
> a) only one server should expire contacts, and this should ideally be the system that actually inserted the record
> b) if that system is unavailable, I'm not sure what I think the correct behaviour should be, but given a server will not show a contact that it is not the "owner" of it probably should just do nothing



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list