[Home]

Summary:ASTERISK-26599: res_pjsip: High startup time using local configuration files
Reporter:Hector Royo Concepcion (HectorRoyo92)Labels:
Date Opened:2016-11-15 06:53:09.000-0600Date Closed:2018-07-13 06:29:42
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:13.12.0 13.11.2 Frequency of
Occurrence
Constant
Related
Issues:
is duplicated byASTERISK-27334 Pjsip Performance issues with qualify enabled
is related toASTERISK-26806 pjsip_options: rework to make more efficient
is related toASTERISK-26730 13.13.1 with bundled pjproject with optimization used cpu twice more then 13.7.2
Environment:Attachments:( 0) pjsip_wizard_sample.conf
Description:I have an Asterisk Box configured with PJSIP, and around 3000 unqualified endpoints, configured via static config files.

Since I updated from 13.9.0 to 13.11.2 I've found that Asteriskk startup time has increased a lot (from <1min to 4-5min). CLI output shows:
{panel}
== Endpoint XXXX is now Reachable
{panel}

For each of the 3000 endpoints, which takes a lot of time.

I've been reading the Changelog for version 13.11.2. There have been improvements to Realtime performance that may affect configurations based on local files . If I comment the following line (1449) on res/res_pjsip/pjsip_options.c:
{panel}
//                      update_all_unqualified_endpoints();
{panel}
...my asterisk starts again in less than 1 minute, and it's fully functional.

Shouldn't this line only be executed if Realtime is used? Is it really needed for a configuration based on static local files?
Comments:By: Asterisk Team (asteriskteam) 2016-11-15 06:53:09.784-0600

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: Hector Royo Concepcion (HectorRoyo92) 2016-11-25 05:58:19.683-0600

The attached file shows the template we're using for all 3000 endpoints, and one sample endpoint.

By: Hector Royo Concepcion (HectorRoyo92) 2016-12-05 03:32:59.683-0600

Right now I'm starting Asterisk without loading the file where my 3000 endpoints are defined.

When Asterisk is fully loaded and running, I load the endpoints file. By doing this I'm getting startup times of <1min including the endpoints load, and apparently, it is fully functional.

But, is this recommendable?

If I just start Asterisk and let it load the endpoints from file, it takes 5mins and 35 seconds.

By: Hector Royo Concepcion (HectorRoyo92) 2016-12-14 06:51:12.181-0600

I'm getting same results in Asterisk 13.12.0 (as expected).

By: Rusty Newton (rnewton) 2016-12-14 14:14:38.387-0600

Thanks for the additional information. The issue is open and in queue for the core team to look at. Of course a community developer can take a look at any time.

By: Hector Royo Concepcion (HectorRoyo92) 2017-01-18 02:29:14.509-0600

My Asterisk 13.12.0 have been running since 21/Dec. It was started with my script, which loads my 3000 endpoints AFTER asterisk has been started.

It has around 340K calls procesed. It seems to work OK.

The only thing I'm seeing is that, when there are more than 100 active channels, the log gets flooded with this message:

[Jan 17 12:28:00] ERROR[3262] channel.c: BUG! Must supply a channel name or partial name to match!

I had this behaviour before the update from version 13.9.1 to 13.12, so I don't think it has anything to be with this issue, but I still don't know what is causing it.


By: Joshua C. Colp (jcolp) 2018-07-02 19:37:41.363-0500

Is this still a problem after the qualify improvements done for ASTERISK-26806? A test case there was a substantial number of endpoints and the performance was substantially better (both at startup and during qualifying)

By: Joshua C. Colp (jcolp) 2018-07-13 06:29:42.675-0500

I've confirmed that this is fixed after the qualify support rewrite.