[SR-Users] out of shm without any visible reason

Daniel-Constantin Mierla miconda at gmail.com
Tue Mar 10 20:23:17 CET 2020


On 10.03.20 20:07, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>> The process is stuck in mysql client library.
>>
>> The async insert is not implemented in the db_cluster module, so at this
>> moment, if you want it, you have to use acc directly with db_mysql
>> module.
> Then how is it possible that most of the time accounting using async
> inserts works and get stuck only once in awhile?

There is no async-insert done by acc with db_cluster, it is always
standard (sync) insert. You would have to track why the mysql server (or
the client library) is blocking from time to time, I don't think it is
something that kamailio can do.

>
> And would it be possible to detect that async inserts are trying to be
> used when K is started and make the start to fail?

The fallback from async-insert to standard-insert is an acc option:

  *
https://www.kamailio.org/docs/modules/stable/modules/acc.html#acc.p.db_insert_mode

You can add a new option to db_insert_mode to fail if async-insert is
not supported by the db connector.

>
> Maybe also some text about that in db_cluster module README would be
> useful.

The db_cluster readme is listing the operations it can do for write-to
and read-from database:

  *
https://www.kamailio.org/docs/modules/stable/modules/db_cluster.html#idm20

You can enhance the docs as you can consider more useful and clear.

Otherwise, I just pushed to master branch a commit implementing
async-insert for db_cluster module, with fallback to standard insert.
Testing and reporting back the results would be appreciated if you plan
to use it in the near future. Also, if you need, you can add a mod param
to have an option not to fallback to standard insert/check async-insert
option at start up.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - April 27-29, 2020, in Berlin -- www.kamailioworld.com




More information about the sr-users mailing list