<div dir="ltr">Hello Folks, <div><br></div><div>I found the root cause of this issue. </div><div><br></div><div>In file ms_msg_list.c, issue is on line 290.</div><div>(<a href="https://github.com/sipwise/kamailio/blob/master/modules/msilo/ms_msg_list.c">https://github.com/sipwise/kamailio/blob/master/modules/msilo/ms_msg_list.c</a>)<br>
</div><div><br></div><div><br></div><div><span class="" style="white-space:pre">Line 290:     </span>p0 = p0->next; </div><div><br></div><div>should be like this below :</div><div><br></div><div><span class="" style="white-space:pre">    </span>p0 = ml->lsent;<br>
</div><div><br></div><div><br></div><div>The issue is p0->next becomes null in first iteration so it won't process more than one element in 'while' loop. Hence this is the main cause of slowness of message deletion. </div>
<div>I have tested modified code and it works fine now. </div><div><br></div><div>Develoerps, </div><div>Please review this change and advise accordingly.</div><div><br></div><div>Thanks </div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Aug 25, 2014 at 11:35 PM, Bhupendra Singh <span dir="ltr"><<a href="mailto:bsingh@bsingh.net" target="_blank">bsingh@bsingh.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>Hi Guys,  </div><div><br></div><div>Has anyone used/using offline message handling and storage in "silo" table?</div><div>My  issue is cleanup of stored message is taking very long time specially when many messages are left for target users. </div>

<div>After further investigation I realized, only one message gets deleted in one pass and next in next pass ( after 30 second default timer). </div><div>Is it intentional ? How can we make sure that all delivered messages get deleted right away for that user? </div>

<div><br></div><div>Thanks</div><div><br></div><div><br></div></div>
</blockquote></div><br></div>