[OpenSIPS-Users] Failed to insert location into DB

microx acmicrox at gmail.com
Tue Jul 16 14:19:30 CEST 2013

Hi all,

In my environment, each UA is allowed to have only one contact. Thus, I set
modparam("registrar", "max_expires", 1) and use save("location", "sf"). With
SIPp continuing to send REGISTERs (100 REGISTERs/second), I find that the
following error occurs sometimes. The reason is that the insert sql is sent
ahead of the delete sql? Or there exists some other root cause? Any help is
greatly appreciated.

Best wishes,

/usr/sbin/opensips[17683]: ERROR:core:db_do_insert: error while submitting
/usr/sbin/opensips[17683]: ERROR:db_postgres:db_postgres_store_result:
0x7f6ce3f669c8 - invalid query, execution aborted
/usr/sbin/opensips[17683]: ERROR:db_postgres:db_postgres_store_result:
0x7f6ce3f669c8: PGRES_FATAL_ERROR
/usr/sbin/opensips[17683]: ERROR:db_postgres:db_postgres_store_result:
/usr/sbin/opensips[17683]: WARNING:db_postgres:db_postgres_insert:
unexpected result returned
/usr/sbin/opensips[17683]: ERROR:usrloc:db_insert_ucontact: inserting
contact in db failed
/usr/sbin/opensips[17683]: ERROR:usrloc:insert_ucontact: failed to insert in
/usr/sbin/opensips[17686]: ERROR:db_postgres:db_postgres_submit_query:
0x7f6ce3f669c8 PQsendQuery Error: ERROR:  duplicate key value violates
unique constraint "location_account_contact_idx"#012DETAIL:  Key (username,
domain, contact, callid)=(2000040875, , sip:2000040875 at,
10219-29515 at already exists.#012 Query: insert into location
) values ('2000040875','sip:2000040875 at','2013-07-18
,'10219-29515 at',2,0,0,'SIPp/Linux',NULL,NULL,'udp:',63,'2013-07-16

View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Failed-to-insert-location-into-DB-tp7587154.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

More information about the Users mailing list