I use mysql as DB. In my mind sometimes ( in case of big query flow for example ), db_mysql:timeout_interval is to small for insertion
defalut mysql param
modparam("db_mysql", "timeout_interval", 2)
i have modparam("usrloc", "timer_interval", 120)
let's look at log: insertion failed
Nov 18 04:02:06 sip140 /usr/local/kamailio/sbin/kamailio[11136]: ERROR: db_mysql [km_dbase.c:122]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query
Nov 18 04:02:06 sip140 /usr/local/kamailio/sbin/kamailio[11136]: ERROR: <core> [db_query.c:235]: db_do_insert_cmd(): error while submitting query
Nov 18 04:02:06 sip140 /usr/local/kamailio/sbin/kamailio[11136]: ERROR: usrloc [ucontact.c:629]: db_insert_ucontact(): inserting contact in db failed
Nov 18 04:02:06 sip140 /usr/local/kamailio/sbin/kamailio[11136]: ERROR: usrloc [urecord.c:386]: wb_timer(): inserting contact into database failed (aor: 00041557)
but in mysql last_modified: 2015-11-18 03:59:59
mysql> select username, last_modified from location where ruid='uloc-5624b05d-2b7c-fde6d7' \G
*************************** 1. row ***************************
username: 00041557
last_modified: 2015-11-18 03:59:59
1 row in set (0.00 sec)
first "Duplicate entry" after usrloc:timer_interval period
Nov 18 04:04:08 sip140 /usr/local/kamailio/sbin/kamailio[11136]: ERROR: db_mysql [km_dbase.c:122]: db_mysql_submit_query(): driver error on query: Duplicate entry 'uloc-5624b05d-2b7c-fde6d7' for key 'ruid_idx'
Nov 18 04:04:08 sip140 /usr/local/kamailio/sbin/kamailio[11136]: ERROR: <core> [db_query.c:235]: db_do_insert_cmd(): error while submitting query
Nov 18 04:04:08 sip140 /usr/local/kamailio/sbin/kamailio[11136]: ERROR: usrloc [ucontact.c:629]: db_insert_ucontact(): inserting contact in db failed
Nov 18 04:04:08 sip140 /usr/local/kamailio/sbin/kamailio[11136]: ERROR: usrloc [urecord.c:386]: wb_timer(): inserting contact into database failed (aor: 00041557)
repeat "Duplicate entry" every usrloc:timer_interval period for long time
Nov 18 19:19:07 sip140 /usr/local/kamailio/sbin/kamailio[11136]: ERROR: db_mysql [km_dbase.c:122]: db_mysql_submit_query(): driver error on query: Duplicate entry 'uloc-5624b05d-2b7c-fde6d7' for key 'ruid_idx'
Nov 18 19:19:07 sip140 /usr/local/kamailio/sbin/kamailio[11136]: ERROR: <core> [db_query.c:235]: db_do_insert_cmd(): error while submitting query
Nov 18 19:19:07 sip140 /usr/local/kamailio/sbin/kamailio[11136]: ERROR: usrloc [ucontact.c:629]: db_insert_ucontact(): inserting contact in db failed
Nov 18 19:19:07 sip140 /usr/local/kamailio/sbin/kamailio[11136]: ERROR: usrloc [urecord.c:386]: wb_timer(): inserting contact into database failed (aor: 00041557)
i delete such records periadicaly from DB
—
Reply to this email directly or view it on GitHub.