<div dir="ltr"><div>Liviu, firstly thanks for a quick and elaborate response.<br></div><div><br></div><div>Yes 'wait_timout' has its default value of 8 hours. I would try to decrease it, but I guess this can lead to more re-connections.</div><div>Am I right?</div><div><br></div><div>And from what I understood, I should not consider re-connections to mysql server, as somewhat dangerous?</div><div>The point of all of this is, that I was able to catch a case, when call was up in the air with "100 Trying" response status (for like 4-5 seconds),</div><div>meanwhile OpenSIPS was re-connecting to mysql server.<br></div><div><br></div><div>Hm.. perhaps I don't get in a right way of how usrloc timer jobs are working.</div><div>You said that:</div><div>"And long-term, the more MySQL ops you will make them do,<br>
as the platform diversifies, the less reconnects they will have to make."</div><div><br></div><div>Could you please describe a bit,<br>why this "the more MySQL ops you will make them do" correlates to this "the less reconnects they will have to make" ?</div><div>Does that mean, that the more job usrloc timer jobs do, the less mysql re-connections I have?</div><div><br></div><div>Thank you and have a nice day!<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 9, 2019 at 11:26 AM Liviu Chircu <<a href="mailto:liviu@opensips.org">liviu@opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Donat!<br>
<br>
I can't think of an OpenSIPS setting that would prevent idling <br>
connections from dropping.<br>
<br>
On the MySQL side, I suggest you look at "wait_timeout" [1], although it <br>
seems to have a<br>
solid default value of 8 hours.  The longer you keep each connection <br>
alive, the less reconnects<br>
you will see in the OpenSIPS logs.<br>
<br>
Some info on the errors:  each time it gets triggered, the usrloc timer <br>
job gets dispatched to<br>
a random OpenSIPS listener process, which will handle it. Depending on <br>
whether this worker has<br>
reused its MySQL connection within the last 8 hours, the worker will <br>
reconnect or not.<br>
<br>
Finally: given that usrloc timer jobs are being run asynchronously, the <br>
fact that some workers<br>
reconnect sporadically is harmless.  And long-term, the more MySQL ops <br>
you will make them do,<br>
as the platform diversifies, the less reconnects they will have to make.<br>
<br>
Best regards,<br>
<br>
[1]: <br>
<a href="https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout" rel="noreferrer" target="_blank">https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout</a><br>
<br>
Liviu Chircu<br>
OpenSIPS Developer<br>
<a href="http://www.opensips-solutions.com" rel="noreferrer" target="_blank">http://www.opensips-solutions.com</a><br>
<br>
On 09.10.2019 11:07, Donat Zenichev wrote:<br>
> My question is, if I'd better look at OpenSIPS side, or should I <br>
> better manage with MySQL server side?<br>
<br>
_______________________________________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.opensips.org" target="_blank">Devel@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"><font style="background-color:rgb(255,255,255)" color="#0b5394">Best regards,<br></font></div><div dir="ltr"><font style="background-color:rgb(255,255,255)" color="#0b5394">Donat Zenichev<br><br></font></div></div></div></div></div></div></div></div>