[SR-Users] siptrace module doesn't close db connections

Daniel-Constantin Mierla miconda at gmail.com
Fri Aug 31 12:23:09 CEST 2018


Hello,

in most of the cases, kamailio keeps the connections open for the entire
duration of running. A connection is shared between modules for the same
kamailio process, so if you have auth_db and siptrace, both will use
same connection. How many kamailio processes (and thus number of db
connections) are there is a matter of children and listen parameters, as
well as couple of extra special processes (timers, rpc servers, ...).

Keeping the connection open is done mainly for performance reasons.

Cheers,
Daniel


On 31.08.18 07:31, Roman Dissauer wrote:
> Hi,
>
> it seems that siptrace module doesn’t close db connections.
>
> I’m on Kamailio 5.1.4 from official debian stretch repository with
> postgresql db module enabled.
> siptrace config:
> modparam("siptrace", "db_url", DBURL)
> modparam("siptrace", "duplicate_uri", "sip:193.32.51.189:9060")
> modparam("siptrace", "hep_mode_on", 1)
> modparam("siptrace", "hep_version", 3)
> modparam("siptrace", "hep_capture_id", 1001)
> modparam("siptrace", "trace_mode", 1)
>
> Here you can see the open connections from the kamailio host:
>
> # select client_addr, state, query from pg_stat_activity where
> client_addr = '10.23.101.61';
>  client_addr  | state |                             query            
>                  
> --------------+-------+----------------------------------------------------------------
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.101.61 | idle  | select table_version from version where
> table_name='sip_trace'
> (31 Zeilen)
>
>
> another example, other installation with same kamailio version 5.1.4:
>
> # select client_addr, state, query from pg_stat_activity where
> client_addr = '10.23.102.1';
>  client_addr | state |                             query              
>                
> -------------+-------+----------------------------------------------------------------
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
>  10.23.102.1 | idle  | select table_version from version where
> table_name='sip_trace'
> (39 Zeilen)
>
>
> Thanks Roman
>
>
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference -- www.kamailioworld.com
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180831/26af12b3/attachment.html>


More information about the sr-users mailing list