[SR-Users] Lost of connection with MySQL?

Daniel Tryba d.tryba at pocos.nl
Tue Feb 14 14:36:16 CET 2017


On Tue, Feb 14, 2017 at 02:27:59PM +0100, Igor Potjevlesch wrote:
> Looks to be a good idea.
> I use MySQL and MyISAM, so I understand that async is supported.

Async (db_insert_mode=2) is supported with any (acc)backend. With myisam you
can use delayed inserts (db_insert_mode=1). But without even looking at
the kamailio implementation I'd guess that 2 is the better choice in the
hope that the sql operation is entirely done in an other thread, with 1
there might be the chance that setting up/reusing connections might
block (since insert delayed is a feature on the mysql server side that
just returns an OK before any writes to disk).

> How should I dimension the number of async_workers?

I set it to 2, but for acc and a few async sql_ops calls that should be
overkill. I have no metrics to make a better assumption on the number of
worker threads.




More information about the sr-users mailing list