[OpenSIPS-Users] handle_timer_job delay in execution

Adrian Fretwell adrian.fretwell at topgreen.co.uk
Wed Nov 30 10:41:20 CET 2016


Hi Razvan,
I am using Opensips 2.2.1 Which I believe is the latest stable version.

PS output:
Process::  ID=0 PID=22168 Type=attendant
Process::  ID=1 PID=22169 Type=RTPP timeout receiver
Process::  ID=2 PID=22170 Type=MI Datagram
Process::  ID=3 PID=22171 Type=MI Datagram
Process::  ID=4 PID=22172 Type=MI FIFO
Process::  ID=5 PID=22173 Type=Stun loop
Process::  ID=6 PID=22174 Type=time_keeper
Process::  ID=7 PID=22175 Type=timer
Process::  ID=8 PID=22176 Type=SIP receiver udp:xxx.xxx.xxx.71:5060
Process::  ID=9 PID=22177 Type=SIP receiver udp:xxx.xxx.xxx.71:5060
Process::  ID=10 PID=22178 Type=SIP receiver udp:xxx.xxx.xxx.71:5060
Process::  ID=11 PID=22179 Type=SIP receiver udp:xxx.xxx.xxx.71:5060
Process::  ID=12 PID=22180 Type=SIP receiver udp:xxx.xxx.xxx.72:5060
Process::  ID=13 PID=22181 Type=SIP receiver udp:xxx.xxx.xxx.72:5060
Process::  ID=14 PID=22183 Type=SIP receiver udp:xxx.xxx.xxx.72:5060
Process::  ID=15 PID=22185 Type=SIP receiver udp:xxx.xxx.xxx.72:5060
Process::  ID=16 PID=22187 Type=SIP receiver udp:xxx.xxx.xxx.71:8060
Process::  ID=17 PID=22189 Type=SIP receiver udp:xxx.xxx.xxx.71:8060
Process::  ID=18 PID=22191 Type=SIP receiver udp:xxx.xxx.xxx.71:8060
Process::  ID=19 PID=22193 Type=SIP receiver udp:xxx.xxx.xxx.71:8060

Here is the modules section from my config, you will be able to see the 
modules loaded and all their parameters.
# ------------------ Modules Section ----------------------------------
#
# Loading modules and their parameters
# ---------------------------------------------------------------------

#set module path
mpath="/usr/local/opensips-pxy-2.2.1/lib64/opensips/modules/"


/* --- Module STUN --------------------
------------------------------------*/
loadmodule "stun.so"
modparam("stun", "primary_ip", "xxx.xxx.xxx.71")
modparam("stun", "alternate_ip", "xxx.xxx.xxx.72")
modparam("stun", "primary_port", "5060")
modparam("stun","alternate_port","3478")

/* --- Module SIGNALING ---------------
------------------------------------*/
loadmodule "signaling.so"


/* --- Module STATELESS ---------------
------------------------------------*/
loadmodule "sl.so"


/* --- Module TRANSACTION -------------
------------------------------------*/
loadmodule "tm.so"
modparam("tm", "fr_timeout", 25)
modparam("tm", "fr_inv_timeout", 120)
modparam("tm", "restart_fr_on_each_reply", 1)
modparam("tm", "onreply_avp_mode", 1)
modparam("tm", "auto_100trying", 0)



/* --- Module RECORD ROUTE ------------
------------------------------------*/
loadmodule "rr.so"
modparam("rr", "append_fromtag", 1)


/* --- Module MAX FORWARD -------------
  ------------------------------------*/
loadmodule "maxfwd.so"
modparam("maxfwd", "max_limit", 80)



/* --- Module SIPMSGOPS ---------------
  ------------------------------------*/
loadmodule "sipmsgops.so"


/* --- Module TEXTOPS -----------------
  ------------------------------------*/
loadmodule "textops.so"


/* --- Module MI_FIFO -----------------
  ------------------------------------*/
loadmodule "mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/tmp/opensips-pxy_fifo")
modparam("mi_fifo", "fifo_mode", 0666)
modparam("mi_fifo", "fifo_group", "a2ipx")


/* --- Module MI_DATAGRAM -----------------

  ------------------------------------*/
loadmodule "mi_datagram.so"
modparam("mi_datagram", "socket_name", "udp:xxx.xxx.xxx.71:9061")
modparam("mi_datagram", "children_count", 2)


/* --- Module URI ---------------------

  ------------------------------------*/
loadmodule "uri.so"
modparam("uri", "use_uri_table", 0)


/* --- Module MYSQL -------------------
  ------------------------------------*/
loadmodule "db_mysql.so"


/* --- Module USRLOC ------------------
  ------------------------------------*/
loadmodule "usrloc.so"
modparam("usrloc", "nat_bflag", "NAT")
modparam("usrloc", "db_mode",   2)
modparam("usrloc", 
"db_url","mysql://opensips221:xxxxxxxxxxxx@localhost/opensips221")


/* --- Module REGISTRAR ---------------
  ------------------------------------*/
loadmodule "registrar.so"
modparam("registrar", "tcp_persistent_flag", "TCP_PERSISTENT")
modparam("registrar", "default_expires", 1800)
modparam("registrar", "min_expires", 300)
modparam("registrar", "max_expires", 3600)
modparam("registrar", "received_avp", "$avp(received_nh)")
modparam("registrar", "max_contacts", 10)


/* --- Module ACC ---------------------
  ------------------------------------*/
loadmodule "acc.so"
modparam("acc", "early_media", 0)
modparam("acc", "report_cancels", 1)
modparam("acc", "detect_direction", 1)
modparam("acc", "db_url", 
"mysql://opensips221:xxxxxxxxxxxx@localhost/opensips221")
modparam("acc", "db_extra", "src_ip=$si; caller_id=$avp(cdr_auth_user); 
callee_id=$tu; call_type=$avp(cdr_call_type); 
direction=$avp(cdr_direction); txfr_call_id=$avp(txfr_call_id)")
modparam("acc", "multi_leg_info", "leg_src=$avp(src); leg_dst=$avp(dst)")


/* --- Module AUTH --------------------
  ------------------------------------*/
loadmodule "auth.so"
#modparam("auth", "disable_nonce_check", 1)


/* --- Module AUTH_DB -----------------
  ------------------------------------*/
loadmodule "auth_db.so"
modparam("auth_db", "calculate_ha1", 0 )
modparam("auth_db", "password_column", "ha1")
modparam("auth_db|uri", "db_url", 
"mysql://opensips221:xxxxxxxxxxxx@localhost/opensips221")
modparam("auth_db", "load_credentials", "$avp(rpid)=rpid; 
$avp(pres)=presentation; $avp(og_acl)=acl_string; 
$avp(std_code)=std_code; $avp(og_con_calls)=con_calls; 
$avp(og_centrex)=centrex; $avp(og_centr
ex_cli)=centrex_cli; $avp(default_cps)=default_cps; 
$avp(allowed_cps)=allowed_cps")


/* --- Module ALIAS_DB ----------------
  ------------------------------------*/
loadmodule "alias_db.so"
modparam("alias_db", "db_url", 
"mysql://opensips221:xxxxxxxxxxxx@localhost/opensips221")


/* --- Module CACHEDB_LOCAL------------
  ------------------------------------*/
loadmodule "cachedb_local.so"
modparam("cachedb_local", "cache_table_size", 20)
modparam("cachedb_local", "exec_threshold", 100000)
modparam("cachedb_local", "cache_clean_period", 1800)


/* --- Module DIALOG ------------------
  ------------------------------------*/
loadmodule "dialog.so"
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "default_timeout", 21600)  # 6 hours timeout
modparam("dialog", "db_mode", 2)
modparam("dialog", "db_update_period", 45)
modparam("dialog", "db_url", 
"mysql://opensips221:xxxxxxxxxxxx@localhost/opensips221")
modparam("dialog", "profiles_with_value", "concalls; gwcalls; inbound; 
outbound")
modparam("dialog", "profiles_no_value", "local; facility")
modparam("dialog", "rr_param", "lts")
modparam("dialog", "options_ping_interval", 60)
modparam("dialog", "reinvite_ping_interval", 900) # 15 minute timeout


/* --- Module NATHELPER ---------------
  ------------------------------------*/
loadmodule "nathelper.so"
modparam("nathelper", "natping_interval", 40)
modparam("nathelper", "ping_nated_only", 0)
modparam("nathelper", "force_socket", "xxx.xxx.xxx.71:5060")
modparam("nathelper", "sipping_bflag", "SIP_PING_FLAG")
modparam("nathelper", "sipping_from", "sip:pinger at vox1.a2ipx.co.uk")
modparam("nathelper", "received_avp", "$avp(received_nh)")
modparam("nathelper", "ping_threshold", 5)
modparam("nathelper", "max_pings_lost", 3)
modparam("nathelper", "natping_partitions", 4)


/* --- Module UAC ---------------------

  ------------------------------------*/
loadmodule "uac.so"
modparam("uac","restore_mode","auto")
modparam("uac","restore_passwd","qh3gd63rs")
modparam("uac","rr_from_store_param","AF-vsf")
modparam("uac","rr_to_store_param","AF-vst")


/* --- Module UAC AUTH ----------------

  ------------------------------------*/
loadmodule "uac_auth.so"


/* --- Module RTPPROXY ----------------
  ------------------------------------*/
loadmodule "rtpproxy.so"
#modparam("rtpproxy", "db_url", 
"mysql://opensips221:xxxxxxxxxxxx@localhost/opensips221")
modparam("rtpproxy", "rtpproxy_sock", "udp:xxx.xxx.xxx.77:12221 
udp:xxx.xxx.xxx.78:12221")
modparam("rtpproxy", "rtpp_notify_socket", "tcp:xxx.xxx.xxx.71:19991")

/* --- Module DIALPLAN ----------------
  ------------------------------------*/
loadmodule "dialplan.so"
modparam("dialplan", "db_url", 
"mysql://opensips221:xxxxxxxxxxxx@localhost/opensips221")


/* --- Module DROUTING ----------------
  ------------------------------------*/
loadmodule "drouting.so"
modparam("drouting", "db_url", 
"mysql://opensips221:xxxxxxxxxxxx@localhost/opensips221")
modparam("drouting", "define_blacklist", 'gws= 2')
modparam("drouting", "use_partitions", 0)
modparam("drouting", "probing_from", "sip:pinger at xxx.xxx.xxx.72")


/* --- Module PERMISSIONS -------------
  ------------------------------------*/
loadmodule "permissions.so"
modparam("permissions", "db_url", 
"mysql://opensips221:xxxxxxxxxxxx@localhost/opensips221")
modparam("permissions", "address_table", "address")


/* --- Module DOMAIN ------------------
  ------------------------------------*/
loadmodule "domain.so"
modparam("domain", "db_mode", 1)   # Use caching
modparam("domain", "db_url", 
"mysql://opensips221:xxxxxxxxxxxx@localhost/opensips221")


/* --- Module SST --------------------
  ------------------------------------*/
#loadmodule "sst.so"
#modparam("sst", "sst_flag", "SST_FLAG")
#modparam("sst", "min_se", 1800)       # 30 min as described in RFC 4028
#modparam("sst", "sst_interval", 0)
#modparam("sst", "enable_stats", 0)    # no stats required


/* --- Module AVPOPS ------------------
  ------------------------------------*/
loadmodule "avpops.so"
modparam("avpops", "db_url", 
"mysql://opensips221:xxxxxxxxxxxx@localhost/opensips221")
modparam("avpops","avp_table","usr_preferences")


/* --- Module EXEC --------------------
  ------------------------------------*/
loadmodule "exec.so"


/* --- Module FRAUD DETECTION----------
  ------------------------------------*/
loadmodule "fraud_detection.so"
modparam("fraud_detection", "db_url", 
"mysql://opensips221:xxxxxxxxxxxx@localhost/opensips221")


/* --- Module SIPTRACE ----------------
  ------------------------------------*/
loadmodule "siptrace.so"
modparam("siptrace", "trace_id", 
"[tid]uri=mysql://opensips221:xxxxxxxxxxxx@localhost/opensips221; 
table=sip_trace;")
#modparam("siptrace", "trace_local_ip", "xxx.xxx.xxx.71")
modparam("siptrace", "trace_on", 0)


/* --- Module OPTIONS -----------------
  ------------------------------------*/
loadmodule "options.so"


/* --- Module TOPOLOGY HIDING----------
  ------------------------------------*/
loadmodule "topology_hiding.so"
modparam("topology_hiding", "th_callid_passwd", "xxxxxxxxxxx")
modparam("topology_hiding", "th_callid_prefix", "JPCJ09_")
modparam("topology_hiding", "force_dialog", 0)
modparam("topology_hiding", "th_contact_encode_passwd", 
"qkwehg34r3kq4bkq4h444")
modparam("topology_hiding", "th_contact_encode_param", "A2Xinc")


/* --- Module PROTO_UDP ---------------
  ------------------------------------*/
loadmodule "proto_udp.so"

Kind regards,

Adrian Fretwell
A² Engineering Services
The Old School house
Top Green
Sibthorpe
Nottinghamshire
NG23 5PN.

On 29/11/16 12:10, Răzvan Crainea wrote:
> Hi, Adrian!
>
> What version of OpenSIPS are you using? Can you update to the latest 
> version?
> Can you also run an "opensipsctl ps" and send the output back? Also, 
> can you send the list of the modules you are using?
>
> Best regards,
> Răzvan Crainea
> OpenSIPS Solutions
> www.opensips-solutions.com
> On 11/28/2016 04:42 PM, Adrian Fretwell wrote:
>>
>> Hi Razvan,
>>
>> No other users of the mysql, everything looks idle.  The machine is 
>> quite powerful a Dell PowerEdge Server with Dual Intel Xeon CPUs (12 
>> cores/24 threads) and 32Gb Memory and a three disk RAID 5 array.  
>> Here is the parameters from config:
>>
>> children=4
>> dns=no
>> rev_dns=no
>>
>> # for customers
>> listen=udp:XX.XX.XX.X1:5060
>>
>> # for gateways
>> listen=udp:XX.XX.XX.X2:5060
>>
>> # for internal media etc.
>> listen=udp:XX.XX.XX.X1:8060
>>
>> From /etc/defaults
>>
>> # Amount of shared memory to allocate for the running OpenSIPS server 
>> (in Mb)
>> S_MEMORY=512
>>
>> # Amount of pkg memory to allocate for the running OpenSIPS server 
>> (in Mb)
>> P_MEMORY=16
>>
>> Kind regards,
>>
>> Adrian.
>>
>>
>> On 28/11/16 13:42, Răzvan Crainea wrote:
>>> Are you doing any DB queries that might take a lot of time? Also, 
>>> how many children are you using?
>>>
>>> Best regards,
>>> Răzvan Crainea
>>> OpenSIPS Solutions
>>> www.opensips-solutions.com
>>> On 11/28/2016 03:33 PM, Adrian Fretwell wrote:
>>>>
>>>> Hi Razvan,
>>>>
>>>> I don't see the error regularly, I think that's what is making it 
>>>> hard to track down, they just seem to randomly occur.  Anyway here 
>>>> is the output of the fifo command, I will check this as soon as I 
>>>> get the next error.
>>>>
>>>> tm:received_replies:: 177
>>>> tm:relayed_replies:: 111
>>>> tm:local_replies:: 6
>>>> tm:UAS_transactions:: 59
>>>> tm:UAC_transactions:: 3
>>>> tm:2xx_transactions:: 56
>>>> tm:3xx_transactions:: 0
>>>> tm:4xx_transactions:: 6
>>>> tm:5xx_transactions:: 0
>>>> tm:6xx_transactions:: 0
>>>> tm:inuse_transactions:: 0
>>>>
>>>> Kind regards,
>>>>
>>>> Adrian Fretwell
>>>> The Old School house
>>>> Top Green
>>>> Sibthorpe
>>>> Nottinghamshire
>>>> NG23 5PN.
>>>>
>>>> On 28/11/16 13:08, Răzvan Crainea wrote:
>>>>> Hi, Adrian!
>>>>>
>>>>> Are you still seeing those errors, even if there is no traffic?
>>>>> Can you check if you have any hung transactions? Just run:
>>>>>
>>>>> scripts/opensipsctl fifo get_statistics tm:
>>>>>
>>>>> Best regards,
>>>>> Răzvan Crainea
>>>>> OpenSIPS Solutions
>>>>> www.opensips-solutions.com
>>>>> On 11/28/2016 12:57 PM, Adrian Fretwell wrote:
>>>>>>
>>>>>> Hello, help please.
>>>>>>
>>>>>> Can anyone give me some direction on how to diagnose what is 
>>>>>> causing timer job delays in execution?  This SIP proxy (2.2.1) 
>>>>>> has virtually no load, you can see from the timestamps in the log 
>>>>>> extract and yet there is still a delay.  I don't know where to 
>>>>>> start looking.
>>>>>>
>>>>>> Nov 28 08:50:37 sip-01 
>>>>>> /usr/local/opensips-pxy-2.2.1/sbin/opensips[22176]: main: 
>>>>>> 185.40.4.47 Relay denied.
>>>>>> Nov 28 08:51:14 sip-01 
>>>>>> /usr/local/opensips-pxy-2.2.1/sbin/opensips[22193]: 
>>>>>> WARNING:core:handle_timer_job: timer job <tm-timer> has a 70000 
>>>>>> us delay in execution
>>>>>> Nov 28 08:54:22 sip-01 
>>>>>> /usr/local/opensips-pxy-2.2.1/sbin/opensips[22178]: main: 
>>>>>> 185.40.4.198 Relay denied.
>>>>>>
>>>>>> Kind regards,
>>>>>>
>>>>>> Adrian Fretwell
>>>>>> The Old School house
>>>>>> Top Green
>>>>>> Sibthorpe
>>>>>> Nottinghamshire
>>>>>> NG23 5PN.
>>>>>>
>>>>>> T: 01636 525360
>>>>>> M: 07850 756603
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Users mailing list
>>>>>> Users at lists.opensips.org
>>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at lists.opensips.org
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> 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/20161130/7df71e5d/attachment-0001.htm>


More information about the Users mailing list