Hello list,
I have a custom made module which uses a timer to monitor some statuses in
a period of 1 second. Inside the function there's a loop that iterates over
a table that can contain several hundreds of items and using each of them
to perform some arithmetical operations.
Under certain conditions, the number of items can grow to a few thousands
in really exceptional cases and I believe this situation is causing
Kamailio's slow timer process to consume more than 90% of CPU hanging up
the other group of processes.
My questions are:
- What is the best way to perform a repetitive task such as a loop in a
timely basis taking in consideration a precision of at least 5 seconds? I'm
currently registering a function using *register_timer() *call.
- Can a loop that takes more than 1 second to complete be causing this
extremely high CPU consumption?
Below is a copy of the top command when the event occurred:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22969 root 20 0 2140m 16m 14m R *98.8* 0.1 7:22.03 kamailio
Thanks in advance,
--
Carlos
http://caruizdiaz.com
+595981146623
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#270 - app_lua: add rpc reload command
User who did this - Víctor Seva (linuxmaniac)
----------
use gen_lock_set_t in order to increase parallelism
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=270#comment775
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Module: sip-router
Branch: master
Commit: 9cb26a2eefe93e0ca162db917e34e784e703770a
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9cb26a2…
Author: Andrew Mortensen <admorten(a)isc.upenn.edu>
Committer: Andrew Mortensen <admorten(a)isc.upenn.edu>
Date: Thu Feb 21 22:32:23 2013 -0500
sca: ensure SCA caller has correct callee CLI when callee is non-SCA.
- previously only set when callee was also SCA
---
modules/sca/sca_call_info.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/sca/sca_call_info.c b/modules/sca/sca_call_info.c
index d717eb1..8e893f5 100644
--- a/modules/sca/sca_call_info.c
+++ b/modules/sca/sca_call_info.c
@@ -1185,17 +1185,20 @@ sca_call_info_invite_reply_200_handler( sip_msg_t *msg,
if ( call_info != NULL ) {
/* this implies To-AoR is SCA */
-
rc = sca_call_info_uri_update( to_aor, call_info, from, to,
contact_uri, &msg->callid->body );
-
- rc = sca_call_info_insert_asserted_identity( msg, contact_uri, to );
}
if ( !sca_uri_is_shared_appearance( sca, from_aor )) {
goto done;
}
+ if ( sca_call_info_insert_asserted_identity( msg, contact_uri, to ) < 0 ) {
+ LM_WARN( "sca_call_info_invite_reply_200_handler: failed to "
+ "add P-Asserted-Identity header to response from %.*s",
+ STR_FMT( contact_uri ));
+ }
+
/*
* XXX in a reply with no Call-Info header, we look for a matching
* dialog for the From URI. if we don't find one, this isn't an SCA
Module: sip-router
Branch: master
Commit: 3bae735a5e38414bd53738928ba531a329290777
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3bae735…
Author: Andrew Mortensen <admorten(a)isc.upenn.edu>
Committer: Andrew Mortensen <admorten(a)isc.upenn.edu>
Date: Thu Feb 21 17:00:31 2013 -0500
sca: prevent possible NULL-dereference in log message when NOTIFY fails.
- sub struct may be NULL outside of else block. Use non-shmem req_sub from
incoming SUBSCRIBE packet instead.
---
modules/sca/sca_subscribe.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/sca/sca_subscribe.c b/modules/sca/sca_subscribe.c
index 2f7a7f0..3307820 100644
--- a/modules/sca/sca_subscribe.c
+++ b/modules/sca/sca_subscribe.c
@@ -1248,8 +1248,8 @@ sca_handle_subscribe( sip_msg_t *msg, char *p1, char *p2 )
/* XXX this should be locked; could use a filled-in req_sub */
if ( sca_notify_subscriber( sca, &req_sub, app_idx ) < 0 ) {
LM_ERR( "SCA %s SUBSCRIBE+NOTIFY for %.*s failed",
- sca_event_name_from_type( sub->event ),
- STR_FMT( &sub->subscriber ));
+ sca_event_name_from_type( req_sub.event ),
+ STR_FMT( &req_sub.subscriber ));
/*
* XXX - what does subscriber do in this case? drop subscription?
* sub is already saved/updated in hash table. let it rot?
Hi!
Tests continue. I've tried using the outbound module so we could mix websocket implementations with others in the test. Using outbound with non-rtcweb clients, traditional SIP ua's, the ACK gets misrouted. Just by not loading the module, everything works as expected.
So there is a bug somewhere in outbound. I'll try to catch up with e-mail to see if Peter pushed a fix tonight.
/O
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#270 - app_lua: add rpc reload command
User who did this - Víctor Seva (linuxmaniac)
----------
Updated patch.
Now we have app_lua.list command to get the list of scripts loaded. And app_lua.reload command that allows you to mark any script to be reloaded.
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=270#comment774
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.