[Home]

Summary:ASTERISK-26194: res_pjsip: At startup when using realtime all endpoints are retrieved
Reporter:thomas m (tommx86)Labels:
Date Opened:2016-07-13 19:46:09Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Resources/res_pjsip
Versions:13.9.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:debian , ubuntu, all..Attachments:( 0) pjsip.conf
( 1) sorcery.conf
Description:With asterisk realtime and pjsip asterisk loads all the endpoints on startup.  When you have over 1000 endpoints, pjsip becomes overwhelmed and crashes disabling active endpoints from authenticating and connecting.

To replicate, create 10k endpoints, and run  asterisk -vvvvc
all endpoints will load and see if still reachable. Short workaround is to no load res_config_mysql.so, then once asterisk boots module load res_config_mysql.so  this bypasses the pjsip show endpoints command which seems to run on startup.
Comments:By: Asterisk Team (asteriskteam) 2016-07-13 19:46:10.415-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Joshua C. Colp (jcolp) 2016-07-14 05:06:55.667-0500

Please provide the Asterisk configuration (pjsip.conf, sorcery.conf) as well as an example of an endpoint. Console log at startup would also be useful.

By: thomas m (tommx86) 2016-07-14 19:53:17.885-0500

console log before crash......
(over5k entries)
100 endpoint is now unreachable
101 endpoint is now unreachable
102 endpoint is now unreachable
103 endpoint is now unreachable
104 endpoint is now unreachable
105 endpoint is now unreachable
106 endpoint is now unreachable
107 endpoint is now unreachable
108 endpoint is now unreachable

By: Joshua C. Colp (jcolp) 2016-07-15 05:33:23.683-0500

What about an example of the endpoint? Do they have unsolicited MWI mailboxes set?

By: thomas m (tommx86) 2016-07-15 05:42:54.619-0500

endpoint straight from the db, mailbox not set.
everything works fine if the following bypass is taken.
noload mysql driver in modules.conf, start asterisk, manually load the mysql driver. it has to be the 'pjsip show endpoints' being loaded and overwhelmed on startup
id transport aors auth   context   disallow allow direct_media force_rport rtp_symmetric
'100', 'transport-udp', '100', '100', 'custom-out', 'all', 'g729;ilbc;gsm;ulaw;alaw', 'no', '', '','', 'yes', '', , 'yes', '',

By: JoshE (n8ideas) 2016-07-18 17:48:45.616-0500

This should be retested with 13 trunk or latest RC for 13.10, which includes this patch:

[ASTERISK-26061]

As long as you are not using Unsolicited MWI ("mailboxes" defined in ps_endpoints), the startup time should be back to a few seconds.

Also, using res_odbc and not res_config_mysql (not sure how you're still doing that) would be advised.  Other changes in later 13 releases have improved ODBC performance and startup time dramatically.