<div dir="ltr">Hi Livui,<br><div><br></div><div>Thank you for your response.</div><div><br></div><div>I've checked wait_timeout and it is the default 28800 (8 hours).</div><div><br></div><div>Is this default not suitable?</div><div><br></div><div>Note that our SIP load balancers currently have little traffic going through it, so is this default value not suitable? Should we be reducing it? Or are these DB log message common/expected in this situation with little traffic?</div><div><br></div><div>I'm still trying to correlate whether these database errors are related to the dispatcher endpoints that are seemingly and randomly failing (when using the opensipsctl dispatcher show or dump commands).</div><div><br></div><div>Thanks.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 7 Jan 2020 at 11:55, 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">
<div>
<p><tt>Hi solarmon,</tt></p>
<p><tt>Please find an elaborate discussion on this topic here [1].
In short,<br>
MySQL's "wait_timeout" setting directly affects the number of
such errors<br>
you are seeing in the logs, unless you are dealing with some
other kind of<br>
a DB problem which causes new connections to be immediately
dropped<br>
(e.g. deadlock, internal error, read-only state, etc.).</tt></p>
<p><tt>Best regards,<br>
</tt></p>
<p><tt>[1]: </tt><tt><a href="http://lists.opensips.org/pipermail/devel/2019-October/026171.html" target="_blank">http://lists.opensips.org/pipermail/devel/2019-October/026171.html</a></tt></p>
<pre cols="72">Liviu Chircu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a>
OpenSIPS Summit, Amsterdam, May 2020
<a href="https://www.opensips.org/events/Summit-2020Amsterdam/" target="_blank">https://www.opensips.org/events/Summit-2020Amsterdam/</a>
OpenSIPS Bootcamp, Miami, March 2020
<a href="https://opensips.org/training/OpenSIPS_Bootcamp_2020/" target="_blank">https://opensips.org/training/OpenSIPS_Bootcamp_2020/</a></pre>
<div>On 07.01.2020 13:45, solarmon wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi,<br>
</div>
<div><br>
</div>
<div>I'm am still getting these database related messages on my
opensips servers.</div>
<div><br>
</div>
<div>/usr/local/sbin/opensips[29086]:
<a>INFO:db_mysql:switch_state_to_disconnected</a>: disconnect event
for 0x7fb482d108a8<br>
/usr/local/sbin/opensips[29086]:
<a>INFO:db_mysql:reset_all_statements</a>: resetting all statements
on connection: (0x7fb482d11080) 0x7fb482d108a8<br>
/usr/local/sbin/opensips[29086]:
<a>INFO:db_mysql:connect_with_retry</a>: re-connected successful for
0x7fb482d108a8<br>
</div>
<div><br>
</div>
<div>As per my last post on this subject, the database it is
using is local to opensips - i.e. running on the same machine
opensips. Thus, there should be no networking or routing or
firewall that could be causing connectivity issues.</div>
<div><br>
</div>
<div>Why is opensips generating such logs suggesting that it
cannot connect to its local database? What could be causing
this issue - opensips or the (MariaDB) database?</div>
<div><br>
</div>
<div>Thank you. </div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, 23 Dec 2019 at 14:49,
solarmon <<a href="mailto:solarmon@one-n.co.uk" target="_blank">solarmon@one-n.co.uk</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">
<div dir="ltr">
<div dir="ltr">Hi,<br>
<div><br>
</div>
<div>Looking at the logs, these
<a>"INFO:db_mysql:switch_state_to_disconnected"</a> events do
occur quite regularly.</div>
<div><br>
</div>
<div>Also note that the database is local to the opensips
node (part of a two node cluster, with mariadb
master/master syncing)).</div>
<div><br>
</div>
<div>As per another post (that has not has a response) I'm
using the
"opensipsctl dispatcher show" to monitor the endpoint
status. I think this is related as I've notice that the
state shown by "
"opensipsctl dispatcher show"" and
"opensipsctl dispatcher dump" differ:</div>
<div><br>
</div>
<div>When using "opensipsctl dispatcher show":<br>
<br>
+----+-------+------------------------+-----------------------+-------+--------+----------+-------+--------------+<br>
| id | setid | destination | socket
| state | weight | priority | attrs | description
|<br>
+----+-------+------------------------+-----------------------+-------+--------+----------+-------+--------------+<br>
| 1 | 1 | sip:A.B.C.D:5060 | udp:W.X.Y.Z:5060 |
2 | 1 | 0 | | |<br>
<br>
When using "opensipsctl dispatcher dump":<br>
<br>
SET:: 1<br>
URI:: sip:A.B.C.D:5060 state=Active
first_hit_counter=0<br>
socket:: udp:W.X.Y.Z:5060<br>
</div>
</div>
<div><br>
</div>
<div>I might change my monitoring script to use
"opensipsctl dispatcher dump", but it was easier for me to
process the tabular format as it contains the destination
and state in the same line.</div>
<div><br>
</div>
<div>Thanks.</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, 23 Dec 2019 at
14:37, Răzvan Crainea <<a href="mailto:razvan@opensips.org" target="_blank">razvan@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">There are no errors -
as the level indicates, there are some INFO <br>
messages indicating that a re-connection is done. Most
likely the <br>
database connection was in a stale state, and the driver
decided to <br>
reconnect. Nothing wrong about that.<br>
<br>
The reason for switching the endpoint in probing mode
comes from the SIP <br>
signaling level - you should add more debugging in your
script to <br>
understand this problem, or take a look at the signaling
level.<br>
<br>
Best regards,<br>
<br>
Răzvan Crainea<br>
OpenSIPS Core Developer<br>
<a href="http://www.opensips-solutions.com" rel="noreferrer" target="_blank">http://www.opensips-solutions.com</a><br>
<br>
On 12/23/19 11:38 AM, solarmon wrote:<br>
> Hi,<br>
> <br>
> I'm investigating why there was a blip in the
Dispatcher endpoint SIP <br>
> Options pings. The endpoint went in to "State=2
(Probing)" state and at <br>
> the same time the following was logged in
opensips.log:<br>
> <br>
> /usr/local/sbin/opensips[29087]: <br>
> <a>INFO:db_mysql:switch_state_to_disconnected</a>:
disconnect event for <br>
> 0x7fb482d108a8<br>
> /usr/local/sbin/opensips[29087]:
<a>INFO:db_mysql:reset_all_statements</a>: <br>
> resetting all statements on connection:
(0x7fb482d11080) 0x7fb482d108a8<br>
> /usr/local/sbin/opensips[29087]:
<a>INFO:db_mysql:connect_with_retry</a>: <br>
> re-connected successful for 0x7fb482d108a8<br>
> /usr/local/sbin/opensips[29077]: <br>
> <a>INFO:db_mysql:switch_state_to_disconnected</a>:
disconnect event for <br>
> 0x7fb482d108a8<br>
> /usr/local/sbin/opensips[29077]:
<a>INFO:db_mysql:reset_all_statements</a>: <br>
> resetting all statements on connection:
(0x7fb482d11080) 0x7fb482d108a8<br>
> /usr/local/sbin/opensips[29077]:
<a>INFO:db_mysql:connect_with_retry</a>: <br>
> re-connected successful for 0x7fb482d108a8<br>
> <br>
> Please can somebody advise what these error
messages mean and how/what <br>
> to investigate it further and resolve it.<br>
> <br>
> Thank you.<br>
> <br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
> <br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>