[OpenSIPS-Users] CDR search slow in CDRTool

Tijmen de Mes tijmen at ag-projects.com
Mon Nov 30 13:01:03 CET 2015


Hi Tomas,

That query should not take 10 seconds. Here it completes in 0.02s according to mysql. The query is used to determine the flow of the calls. After the query is executed in CDRTool, more logic follows. It can easily be that the delay is in there.

If web normalizing is enabled and the call is not normalized,  it will also try to normalize and rate the calls while searching. This can be disabled if you don’t need/want it. Perhaps you can disable this to check if this causes the delay.

To disable it add to the opensips datasource in global.inc:  "skipNormalizeOnPageLoad" => 1


Best regards,

Tijmen de Mes
—
AG Projects


> On 30 nov. 2015, at 10:26, Tomas Andersen <tomas.andersen at ipco.no> wrote:
> 
> Hi again.
> 
> I have set up wireshark to check why the CDR rating engine uses so much time.
> 
> The following SQL queries are run from CDRTool to my OpenSIPS server:
> select * from domain;
> select * from trusted_peers;
> Select rpid from subscriber where username = ‘+47xxxxxxxx’ and domain = ‘example.sip.com’
> 
> (with username and domain scrambled here)
> 
> The rpid select statement is run for each caller in the search period. What is strange is that these selects are only run each 10 second, and if I am searching
> Within a period of time and there has been 7 different callers, it will take 70 seconds. After this the GUI is “released” and updated with the maching CDR list.
> 
> My subscriber table in open sips is empty. Why does this take so long?
> 
> Regards,
> Tomas Andersen
> 
> 
> From: Tomas Andersen
> Date: Friday 27 November 2015 at 09:10
> To: "users at lists.opensips.org <mailto:users at lists.opensips.org>"
> Subject: CDR search slow in CDRTool
> 
> Hi
> 
> I have set up CDRTool to read CDRs from my radius database for OpenSIP calls. I am successfully rating calls, but everytime I search for CDR records using the
> CDRTool GUI it takes 1-3 minutes before the search result window is shown.
> 
> If there are no matching records the result window is shown immediately. Does anyone else have any experience with this? I suspect that there might be a database lock,
> Database connection pool problems or just some configuration error somewhere.
> 
> In my browser I get the following in my developer console / network (note the huge duration for the HTTP POST):
> 
> 200 POST callsearch.pthml<destip>
> html105.41 kb
> 150212 ms
> 200 GET date picker.css<destip>
> css9.96 kb
> 14 ms
> 
> Followed by several lines of
> 304 GETs
> 
> 
> When checking with Wireshark I notice that after the HTTP POST to callsearch, I get several TCP Keep-Alive messages as the server is slow..
> After 2m 38 seconds everything is suddenly released and some HTTP GETs make the page to update.
> 
> I see nothing in syslog (from cdrtool) but some mysql connection statements.. No lock/unlock or similar statements..
> 
> I appreciate if anyone could enlighten me on this subject.
> 
> 
> Best Regards,
> Tomas Andersen
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20151130/b925bee8/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.opensips.org/pipermail/users/attachments/20151130/b925bee8/attachment.pgp>


More information about the Users mailing list