[OpenSIPS-Devel] Location table structure - account_contact_idx

Donat Zenichev donat.zenichev at gmail.com
Wed Oct 9 04:07:43 EDT 2019

Hi there!
There is pretty shooort additional question.

After I have migrated my staging system to sql write-back mode,
part of the application servers (opensips SBCs, that are location servers
at the same time for subsribers),
are experiencing sporadic re-connections to a mysql database server.

I've been struggling with mysql related parameters last several days,
especially with timeouts, like:
net_read_timeout / net_write_timeout

I also looked through the usrloc and db_mysql parameters, and found some
parameters that could have had some affection, like:
db_mysql.so - timeout_interval (that is now 2 seconds by default)
db_mysql.so - max_db_queries (that is now 2 times by default)
db_mysql.so - max_db_retries (that is now 3 times by default)

Other than that, I saw a mention from Bogdan, that it's a normal case when
OpenSIPS system drops idling connections to a mysql server:

My found was, that mysql re-connections are happening exactly at the same
second of a minute, like:
Oct 9 01:48:14 my_node_name opensipsdev[13721]:
INFO:db_mysql:connect_with_retry: re-connected successful for 0x7f049b9946f8
Oct 9 02:42:14 my_node_name opensipsdev[13724]:
INFO:db_mysql:connect_with_retry: re-connected successful for 0x7f049b9946f8
Oct 9 06:18:14 my_node_name opensipsdev[13707]:
INFO:db_mysql:connect_with_retry: re-connected successful for 0x7f049b9946f8
Oct 9 07:12:14 my_node_name opensipsdev[13726]:
INFO:db_mysql:connect_with_retry: re-connected successful for 0x7f049b9946f8
Oct 9 08:06:14 my_node_name opensipsdev[13709]:
INFO:db_mysql:connect_with_retry: re-connected successful for 0x7f049b9946f8

I guess... this relates to a time step I picked out with:
usrloc.so - timer_interval

There are a list of the parameters I've recently added to usrloc module:
modparam("usrloc", "sql_write_mode", "write-back")
modparam("usrloc", "restart_persistency", "load-from-sql")
modparam("usrloc", "regen_broken_contactid", 1)
modparam("usrloc", "timer_interval", 10)

My question is, if I'd better look at OpenSIPS side, or should I better
manage with MySQL server side?

Thanks for your attention.

On Wed, Oct 2, 2019 at 4:40 PM Liviu Chircu <liviu at opensips.org> wrote:

> On 02.10.2019 16:35, Donat Zenichev wrote:
> > "and other tasks, that need to be run periodically" - this part a
> > little bit non-clear. : )
> I have no idea what those "other tasks" are, really.  I made a note to
> double-check the logic and
> delete that phrase if it's causing more confusion than not.
> >
> > Could you please confirm it's okay to play with "time_interval"?
> Yes, absolutely.  Lowering it will not cause extra queries either, since
> only contacts flagged as "DIRTY"
> are sync'ed to DB.
> Liviu Chircu
> OpenSIPS Developer
> http://www.opensips-solutions.com
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Best regards,
Donat Zenichev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20191009/ec7721d0/attachment.html>

More information about the Devel mailing list