Hey everyone!
We noticed that under high load of registrations and using the pua module we can reach a state where the PUA table bloats our Postgres to several GB. However, a SELECT on pua only shows a few hundred entries. The other half million or so entries are obsoleted but not cleaned up.
The reason for this seems to be that the autovacuumer of the Postgres can't get to work because the PUA table is almost permanently locked.
Our Postgres logs are full with errors about the autovacuumer being canceled because it couldn't get to work.
Looking at modules/db_postgres/km_dbase.c::db_postgres_start_transaction() I noticed that there are two locking modes used:
str lock_write_end_str = str_init(" IN EXCLUSIVE MODE");
str lock_full_end_str = str_init(" IN ACCESS EXCLUSIVE MODE");
According to
https://www.postgresql.org/docs/9.2/static/explicit-locking.html
these modes mean forbidding everything else except reads and forbidding everything else.
However, according to this documentation ROW EXCLUSIVE is the standard lock for entry altering operations (INSERT, UPDATE, DELETE). And this would still allow the autovacuumer to do its job.
Is there a specific reason why these more restricting locking modes are used instead of ROW EXCLUSIVE?
Thanks.
Best regards,
Stefan
Hello,
we have deployed a Kamailio acting as SIP proxy on a RHEL 7.2 machine.
Clients (mainly mobile phones) connects to the proxy using a TLS protected
TCP connection.
In the kamailio config, we've set :
#!ifdef WITH_TLS
enable_tls=yes
tcp_async=yes
tcp_connection_lifetime=3605
tcp_accept_no_cl=yes
tcp_crlf_ping = yes
#!endif
Our problem is that, even if we set the tcp_connection_lifetime to > 1 hour,
the tcp connection is closed after 10 minutes: on tcp dumps, we see clearly
the TCP FIN sent by machine hosting the kamailio proxy... Setting parameters
tcp_keepidle/keepintlv/keepcnt in the kamailio config didn't change the
behavior. We also set TCP keepalived at system level, but without result...
This TCP closure is causing us lot of problems when calls between 2 UAs last
more than 10 minutes because the REINVITE or BYE messages are lost. Also,
closing the TCP connection will wake up the mobile app and make it resend a
REGISTER, thing we absolutely want to avoid.
Is there a parameter we can use to avoid this closure? I had a look in
previous posts, found people with the same problem as mine, but no real
solution...
Thx for your help.
Giovanni
--
View this message in context: http://sip-router.1086192.n5.nabble.com/TCP-FIN-after-10-minutes-tp152646.h…
Sent from the Users mailing list archive at Nabble.com.
Hello Everyone,
This message as continue conversation from http://lists.sip-router.org/pipermail/sr-users/2015-March/087557.html. That my previous post about it. I never was be be able forward NOTIFY from asterisk to client through kamailio.
Right now in use asterisk 14 pjsip.
Any help thank you.
volga629
From: "volga629" <volga629(a)skillsearch.ca>
To: "sr-users" <sr-users(a)lists.sip-router.org>
Sent: Wednesday, 19 October, 2016 18:36:52
Subject: [SR-Users] help with NOTIFY
Hello Everyone,
I am trying forward NOTIFY to client.
My setup is
PBX Server ---- local lan ---kamailio ---- internet ---- client
The problem with whole setup that kamailio is not forwarding NOTIFY to client.
Here are log.
U 2016/10/19 14:23:29.581609 10.18.130.50:5160 -> 10.18.130.46:5060
NOTIFY sip:10101@10.18.130.46:5060 SIP/2.0.
Via: SIP/2.0/UDP 10.18.130.50:5160;rport;branch=z9hG4bKPjONocd4FvI5LkOmSR6ZCA5Z1f7SYDb3Ty.
From: <sip:8101@networklab.ca>;tag=ziApds23FQsPL2zd6q8pCUlwW.jwa6mK.
To: "Slava" <sip:10101@networklab.ca>;tag=734f813f.
Contact: <sip:10.18.130.50:5160>.
Call-ID: A0bJWg8v0nGmtUmiHzUixQ...
CSeq: 18547 NOTIFY.
Route: <sip:kamailio_local_ip:5060;lr;r2=on;ftag=734f813f>.
Route: <sip:kamailio_public_ip:5081;transport=tls;lr;r2=on;ftag=734f813f>.
Event: presence.
Subscription-State: active;expires=413.
Allow-Events: message-summary, presence, dialog, refer.
Max-Forwards: 70.
User-Agent: FPBX-13.0.188.9(14.0.2).
Content-Type: application/pidf+xml.
Content-Length: 579.
.
<?xml version="1.0" encoding="UTF-8"?>
<presence entity="sip:8101@10.18.130.50:5160" xmlns="urn:ietf:params:xml:ns:pidf" xmlns:pp="urn:ietf:params:xml:ns:pidf:person" xmlns:es="urn:ietf:params:xml:ns:pidf:rpid:status:rpid-status" xmlns:ep="urn:ietf:params:xml:ns:pidf:rpid:rpid-person">
<note>On the phone</note>
<tuple id="8101">
<status>
<basic>closed</basic>
</status>
<contact priority="1">"Slava" <sip:10101@networklab.ca></contact>
</tuple>
<pp:person>
<status>
<ep:activities>ep:busy</ep:activities>
</status>
</pp:person>
</presence>
U 2016/10/19 14:23:32.045388 10.18.130.46:5060 -> 10.18.130.50:5160
SIP/2.0 408 Request Timeout.
Via: SIP/2.0/UDP 10.18.130.50:5160;rport=5160;branch=z9hG4bKPju05rMNlzhfukLvaq4ELmq.QI4GBqDN-m;received=10.18.130.50.
From: <sip:8101@networklab.ca>;tag=Yzy2m6O2AFT6rGSDBmo6PjcGaCWT1i5H.
To: "Slava" <sip:10101@networklab.ca>;tag=ad5a945e.
Call-ID: 2pq5iebmtLdB_OsMUs3EOg...
CSeq: 14623 NOTIFY.
Server: kamailio (4.3.4 (x86_64/linux)).
Content-Length: 0.
Any help thank you.
volga629
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello there,
I'm sending this email in order to know if anyone had work or has any idea
how we can generate Documentation from kamailio script using Comments?
This would be great because we could write comments explaining the Route
method during script development and use it to generate documentation
about our kamailio script, saving time and leave our deployment documented.
Thank you
--
Best Regards
José Seabra
Hi All,
I am configured kamailio to handle reg info event subscriptions, My server
is running if i configure the following parameter.
#kamailio local ip is 192.168.20.20
*modparam("pua_reginfo", "server_address", "sip:reginfo@192.168.20.20
<sip%3Areginfo(a)192.168.20.20>")*
If i am not configured the above server address, i am getting bad
configuration
Oct 18 11:31:36 arm /usr/sbin/kamailio[2787]: INFO: auth [auth_mod.c:333]:
mod_init(): auth: qop set, but nonce-count (nc_enabled) support disabled
Oct 18 11:31:36 arm /usr/sbin/kamailio[2787]: INFO: permissions
[parse_config.c:251]: parse_config_file(): file not found:
/etc/kamailio/permissions.allow
Oct 18 11:31:36 arm /usr/sbin/kamailio[2787]: INFO: permissions
[permissions.c:607]: mod_init(): default allow file
(/etc/kamailio/permissions.al... rule set
Oct 18 11:31:36 arm /usr/sbin/kamailio[2787]: INFO: permissions
[parse_config.c:251]: parse_config_file(): file not found:
/etc/kamailio/permissions.deny
Oct 18 11:31:36 arm /usr/sbin/kamailio[2787]: INFO: permissions
[permissions.c:616]: mod_init(): default deny file
(/etc/kamailio/permissions.den... rule set
*Oct 18 11:31:36 arm /usr/sbin/kamailio[2787]: ERROR: pua_reginfo
[pua_reginfo.c:105]: mod_init(): server_address parameter not set*
*Oct 18 11:31:36 arm /usr/sbin/kamailio[2787]: ERROR: <core>
[sr_module.c:944]: init_mod(): Error while initializing module pua_reginfo
(/usr/lib/...ginfo.so)*
Oct 18 11:31:36 arm /usr/sbin/kamailio[2787]: INFO: <core>
[sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
Oct 18 11:31:36 arm kamailio[2771]: already running ... failed!
Oct 18 11:31:36 arm kamailio[2771]: .
Oct 18 11:31:36 arm systemd[1]: Started LSB: Start the Kamailio SIP proxy
server.
Hint: Some lines were ellipsized, use -l to show in full.
I want to know what is the significance of this parameter and find no where
this value is used.
Thanks in advance.
Regards,
Raman
Hi folk!
Have a production server
- used as webrtc to sip proxy
- it is built on kamailio v 4.4.2
- Server handles connections from ~4000 incoming SIP trunks (transport=TLS).
Kamailio provides auth for this trunks.
- Kamailio receives also connections from Webrtc app. Calls from Webrtc
routed to one of the 4000 sip trunks.
Server is running on Debian GNU/Linux 7
The number of calls on the system is small. Most of the load is generated by
registration/re-registrations of SIP trunks
The problem is following:
- output of kamcmd core.shmmem and kamcmd pkg.stats shows constant using of
memory
- output of htop shows constantly increasing memory usage, e.g. after one
week working:
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
.....
6013 kamailio 20 0 744M 134M 130M S 0.0 3.6 2:28.80
/usr/sbin/kamailio -f /etc/kamailio/kamailio.cfg -P
/var/run/kamailio/kamailio.pid -m 512 -M 32 -u kamailio -g kamailio
6002 kamailio 20 0 744M 134M 130M S 0.0 3.6 2:30.93
/usr/sbin/kamailio -f /etc/kamailio/kamailio.cfg -P
/var/run/kamailio/kamailio.pid -m 512 -M 32 -u kamailio -g kamailio
6012 kamailio 20 0 744M 134M 130M S 0.0 3.5 2:35.00
/usr/sbin/kamailio -f /etc/kamailio/kamailio.cfg -P
/var/run/kamailio/kamailio.pid -m 512 -M 32 -u kamailio -g kamailio
5991 kamailio 20 0 744M 133M 129M S 0.0 3.5 2:05.88
/usr/sbin/kamailio -f /etc/kamailio/kamailio.cfg -P
/var/run/kamailio/kamailio.pid -m 512 -M 32 -u kamailio -g kamailio
6018 kamailio 20 0 744M 133M 129M S 0.0 3.5 2:31.90
/usr/sbin/kamailio -f /etc/kamailio/kamailio.cfg -P
/var/run/kamailio/kamailio.pid -m 512 -M 32 -u kamailio -g kamailio
.....
Despite running with: PKG_MEMORY=32, Amount of used memory per process is
higher.
Finishes all with monit killing kamailio, because of memory usage more than
allowed
studied this tutorial:
https://www.kamailio.org/wiki/tutorials/troubleshooting/memory
but did not find a way how to dig up the problem's root.
Tried also to reproduce the issue in lab environment (having clone of
production server). Generated load with incoming registration using PJSIP,
but with no success - memory usage is constant.
kamailio -v
version: kamailio 4.4.2 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 4.7.2
Any suggestion/idea how to troubleshoot deeper would be highly apprecieted
Cheers!
--
View this message in context: http://sip-router.1086192.n5.nabble.com/memory-is-not-freed-in-system-while…
Sent from the Users mailing list archive at Nabble.com.
Hello!
I am trying to implement limit of active calls for subscribers. And for
each subscriber this limit must be personal.
I find example route in presentation of Daniel-Constantin Mierla.
And i need to set $xavp(caller=>active_calls) = 1;
for each dialog. But i can't understand how to load this number of active
calls from some-thing similar of user profile or subscriber table?
route[DIALOG] {
if (is_method("CANCEL") || (has_totag() &&
is_method("INVITE|BYE|ACK"))) {
dlg_manage();
return;
}
if (is_method("INVITE") && !has_totag() &&
!isflagset(WITH_ACTIVE_CALLS_LIMIT)) {
if( $xavp(caller[0]=>active_calls) != $null &&
$xavp(caller[0]=>active_calls) > 0 ) {
if(!get_profile_size("caller", "$fU@$fd", "$var(acsize)")) {
send_reply("500", "No more active calls");
exit;
}
if($var(acsize)>=$xavp(caller[0]=>active_calls)) {
send_reply("403", "No more active calls");
exit;
}
set_dlg_profile("caller", "$fU@$fd");
}
setflag(WITH_ACTIVE_CALLS_LIMIT);
dlg_manage();
}
}