<div dir="ltr"><div>Yes, using startup route in my routing script and running DB query. This kind of warning I didn't face using 1.6 and 1.8 opensips versions but 2.2.2.<br><br></div>Will you recommend async statement for my current routing (see below) for the startup?<br><br>startup_route<br>{<br> $var(res) = 1;<br> $avp(tmp) = "1";<br> # $var(x) = 0;<br> while($var(res) > 0)<br> {<br> $var(res) = avp_db_query("SELECT Distinct One800, dnis FROM DNIS_Mapping where One800 > $avp(tmp) order by One800;", "$avp(One800), $avp(dnis)");<br> if($var(res) >= 0)<br> {<br> $var(i) = 0;<br> while($(avp(One800)[$var(i)]) != "NULL")<br> {<br> cache_store("local", "DNIS_$(avp(dnis)[$var(i)])", "$(avp(One800)[$var(i)])");<br> $avp(tmp) = $(avp(One800)[$var(i)]);<br> # $var(x) = $var(x) + 1;<br> $(avp(One800)[$var(i)]) = "NULL";<br> $var(i) = $var(i) + 1;<br> # xlog("$var(x) : $(avp(s:dnis)[$var(i)])");<br> }<br> }<br> }<br>}<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 24, 2017 at 6:38 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hi Ahmed,<br>
<br>
So, the warnings pop up ONLY during startup sequence. Do you use
startup route or any module performing mem caching of some DB table
(drouting, permission, etc) ? Usually, the first UDP child is doing
some heavy lifting during startup.<span class=""><br>
<br>
Regards,<br>
<pre class="m_-6569476229966256159moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="m_-6569476229966256159moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a></pre>
</span><div><div class="h5"><div class="m_-6569476229966256159moz-cite-prefix">On 01/19/2017 06:01 PM, Ahmed Munir
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi Razvan,<br>
<br>
</div>
During starting up the opensips service, I see the first
opensips child process (pid"11172) consumes CPU process to
70-80% and later drop downs to 0.3 - 0.0 % CPU per core. See
below;<br>
<br>
[root@qorblpsisprxyd1 ~]# top -c -u opensips<br>
top - 10:49:54 up 76 days, 23:31, 5 users, load average: 0.00,
0.00, 0.00<br>
Tasks: 229 total, 1 running, 228 sleeping, 0 stopped, 0
zombie<br>
Cpu(s): 0.0%us, 0.1%sy, 0.0%ni, 99.9%id, 0.0%wa, 0.0%hi,
0.0%si, 0.0%st<br>
Mem: 65964364k total, 2568124k used, 63396240k free, 180220k
buffers<br>
Swap: 1023996k total, 0k used, 1023996k free, 1226104k
cached<br>
<br>
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+
COMMAND<br>
11177 opensips 20 0 165m 5696 4528 S 0.3 0.0 0:00.23
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips<br>
11187 opensips 20 0 165m 5628 4460 S 0.3 0.0 0:00.41
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips<br>
11166 opensips 20 0 165m 6892 5752 S 0.0 0.0 0:00.23
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips<br>
11168 opensips 20 0 165m 1980 840 S 0.0 0.0 0:00.00
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips<br>
11169 opensips 20 0 165m 1464 328 S 0.0 0.0 0:00.53
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips<br>
11171 opensips 20 0 165m 1640 504 S 0.0 0.0 0:00.15
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips<br>
11172 opensips 20 0 166m 40m 38m S 0.0 0.1 0:02.61
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips<br>
11174 opensips 20 0 165m 6304 5136 S 0.0 0.0 0:00.24
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips<br>
11175 opensips 20 0 165m 5884 4716 S 0.0 0.0 0:00.22
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips<br>
11179 opensips 20 0 165m 7660 6492 S 0.0 0.0 0:00.27
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips<br>
11181 opensips 20 0 165m 7756 6588 S 0.0 0.0 0:00.33
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips<br>
11183 opensips 20 0 165m 5520 4352 S 0.0 0.0 0:00.34
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips<br>
11185 opensips 20 0 165m 7336 6168 S 0.0 0.0 0:00.36
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips<br>
11189 opensips 20 0 165m 7320 6152 S 0.0 0.0 0:00.36
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips<br>
11190 opensips 20 0 165m 4688 3528 S 0.0 0.0 0:00.30
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips<br>
<br>
<div>
<div>
<div class="gmail_extra">[root@qorblpsisprxyd1 ~]#
opensipsctl fifo ps<br>
Process:: ID=0 PID=11166 Type=attendant<br>
Process:: ID=1 PID=11168 Type=MI FIFO<br>
Process:: ID=2 PID=11169 Type=time_keeper<br>
Process:: ID=3 PID=11171 Type=timer<br>
Process:: ID=4 PID=11172 Type=SIP receiver udp:<a href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a><br>
Process:: ID=5 PID=11174 Type=SIP receiver udp:<a href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a><br>
Process:: ID=6 PID=11175 Type=SIP receiver udp:<a href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a><br>
Process:: ID=7 PID=11177 Type=SIP receiver udp:<a href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a><br>
Process:: ID=8 PID=11179 Type=SIP receiver udp:<a href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a><br>
Process:: ID=9 PID=11181 Type=SIP receiver udp:<a href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a><br>
Process:: ID=10 PID=11183 Type=SIP receiver udp:<a href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a><br>
Process:: ID=11 PID=11185 Type=SIP receiver udp:<a href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a><br>
Process:: ID=12 PID=11187 Type=SIP receiver udp:<a href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a><br>
Process:: ID=13 PID=11189 Type=SIP receiver udp:<a href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a><br>
Process:: ID=14 PID=11190 Type=Timer handler<br>
<br>
OpenSIPs used by each CPU processor;<br>
<br>
[root@qorblpsisprxyd1 ~]# ps -o pid,psr,comm -C opensips<br>
PID PSR COMMAND<br>
11166 0 opensips<br>
11168 2 opensips<br>
11169 6 opensips<br>
11171 5 opensips<br>
11172 5 opensips<br>
11174 5 opensips<br>
11175 5 opensips<br>
11177 5 opensips<br>
11179 7 opensips<br>
11181 1 opensips<br>
11183 0 opensips<br>
11185 2 opensips<br>
11187 5 opensips<br>
11189 5 opensips<br>
11190 4 opensips<br>
</div>
</div>
</div>
</div>
<br>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Regards,<br><br>Ahmed Munir Chohan<br><br></div>
</div>