During init, the kazoo module performs forking for "AMQP Consumer Worker".
The ranks for all this process are incremented one by one, starting with value 
1.
Value 1 is defined as PROC_SIPINIT and has a special meaning for most of the 
regular modules.
One side effect of this is that the registration records are loaded from the db 
twice!
One simple fix would be to fork all the workers with a PROC_NOCHLDINIT ranking.

Proposed patch:
````
--- a/src/modules/kazoo/kazoo.c
+++ b/src/modules/kazoo/kazoo.c
@@ -369,7 +369,7 @@ static int mod_child_init(int rank)
                */

                for(i=0; i < dbk_consumer_workers; i++) {
-                       pid=fork_process(i+1, "AMQP Consumer Worker", 1);
+                       pid=fork_process(PROC_NOCHLDINIT, "AMQP Consumer 
Worker", 1);
                        if (pid<0)
                                return -1; /* error */
                        if(pid==0){
````

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/972
_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to