[SR-Users] Lost of connection with MySQL?
Daniel-Constantin Mierla
miconda at gmail.com
Wed Feb 15 08:56:45 CET 2017
Hello,
it doesn't have to be from kamailio.cfg, but any query from external
tools, like cron jobs, billing applications, etc ...
Can you measure how long it takes to do a query from the command line?
Just try to select the records by a call-id.
Also, there are some core parameters that will print log messages in
case of slow queries/actions, see the core cookbook.
Moreover, the db_mysql module has some parameters to tune the timeouts.
Cheers,
Daniel
On 14/02/2017 14:22, Igor Potjevlesch wrote:
>
> Hello,
>
>
>
> There is only queries on a replication server, so not the one reported
> in the errors, to make some fraud detections. But, directly from
> Kamailio config file, there's no queries.
>
> The structure is: id as primary and callid is an index.
>
>
>
> Regards,
>
>
>
> Igor.
>
>
>
> *De :*Daniel-Constantin Mierla [mailto:miconda at gmail.com]
> *Envoyé :* mardi 14 février 2017 12:06
> *À :* Igor Potjevlesch <igor.potjevlesch at gmail.com>; 'Kamailio (SER) -
> Users Mailing List' <sr-users at lists.sip-router.org>
> *Objet :* Re: [SR-Users] Lost of connection with MySQL?
>
>
>
> Hello,
>
> it is a lot if you have over 9 million records. Do you run other
> periodical queries over acc, like generating full cdrs every N minutes?
>
> Have you created other constraints (e.g., unique keys) over the table?
>
> Cheers,
> Daniel
>
>
>
> On 14/02/2017 11:51, Igor Potjevlesch wrote:
>
> Hello Daniel,
>
>
>
> Actually 9 031 181.
>
> Regards,
>
>
>
> Igor.
>
>
>
> *De :*sr-users [mailto:sr-users-bounces at lists.sip-router.org] *De
> la part de* Daniel-Constantin Mierla
> *Envoyé :* mardi 14 février 2017 10:57
> *À :* Kamailio (SER) - Users Mailing List
> <sr-users at lists.sip-router.org> <mailto:sr-users at lists.sip-router.org>
> *Objet :* Re: [SR-Users] Lost of connection with MySQL?
>
>
>
> Hello,
>
> do you have a lot of records inside the acc table?
>
> Cheers,
> Daniel
>
> On 14/02/2017 09:54, Igor Potjevlesch wrote:
>
> Hello,
>
>
>
> Two times in the last week, Kamailio reports MySQL errors like
> these:
>
>
>
> /usr/local/sbin/kamailio[19225]: ERROR: db_mysql
> [km_dbase.c:126]: db_mysql_submit_query(): driver error on
> query: Can't connect to MySQL server on '192.168.2.6' (4) (2003)
>
> /usr/local/sbin/kamailio[19225]: ERROR: <core>
> [db_query.c:235]: db_do_insert_cmd(): error while submitting query
>
> /usr/local/sbin/kamailio[19225]: ERROR: acc [acc.c:504]:
> acc_db_request(): failed to insert into database
>
>
>
> These errors are repeated many times and cause Kamailio to
> hang and don't reply to SIP requests. A reboot of Kamailio
> solves the issue.
>
>
>
> Anyone has already had this issue and had solved it?
>
>
>
> Regards,
>
>
>
> Igor.
>
>
>
> ------------------------------------------------------------------------
>
> Avast logo
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>
>
>
> L'absence de virus dans ce courrier électronique a été
> vérifiée par le logiciel antivirus Avast.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>
>
>
>
>
>
>
> _______________________________________________
>
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>
> sr-users at lists.sip-router.org
> <mailto:sr-users at lists.sip-router.org>
>
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
>
>
>
> --
>
> Daniel-Constantin Mierla
>
> www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
>
> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com <http://www.asipto.com>
>
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com <http://www.kamailioworld.com>
>
>
>
> ------------------------------------------------------------------------
>
> Avast logo
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>
>
>
> L'absence de virus dans ce courrier électronique a été vérifiée
> par le logiciel antivirus Avast.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>
>
>
>
>
>
> --
> Daniel-Constantin Mierla
> www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com <http://www.asipto.com>
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com <http://www.kamailioworld.com>
>
>
> ------------------------------------------------------------------------
> Avast logo
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>
>
> L'absence de virus dans ce courrier électronique a été vérifiée par le
> logiciel antivirus Avast.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>
>
>
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170215/2ebf4b38/attachment.html>
More information about the sr-users
mailing list