[SR-Users] Problem with reconnection to database server

Minh Phan mphan at wengo.com
Tue Sep 4 15:17:20 CEST 2018


Hi List,

My Kamailio instance is disconnected from database server (Postgres) quite
often (after running for some days) and it won't manage to reconnect. Any
idea why this happens? Normally it try to reconnect when connection with
the DB is lost, desn't it? Bellow are the related log messages.

Best regards,
Minh Phan


Sep  4 11:31:20 : ERROR: <core> [db_query.c:235]: db_do_insert_cmd(): error
while submitting query
Sep  4 11:31:20 : ERROR: db_postgres [km_dbase.c:559]:
db_postgres_store_result(): invalid query, execution aborted
Sep  4 11:31:20 : ERROR: db_postgres [km_dbase.c:561]:
db_postgres_store_result(): driver error: PGRES_FATAL_ERROR,
Sep  4 11:31:20 : WARNING: db_postgres [km_dbase.c:609]:
db_postgres_insert(): unexpected result returned
Sep  4 11:31:20 : ERROR: topos [tps_storage.c:599]: tps_db_insert_dialog():
failed to store message
Sep  4 11:31:20 : ERROR: topos [tps_storage.c:412]: tps_storage_record():
failed to store
Sep  4 11:31:20 : WARNING: db_postgres [km_dbase.c:259]:
db_postgres_submit_query(): postgres query command failed, connection
status 1, error [no connection to the server#012]
Sep  4 11:31:20 : WARNING: db_postgres [km_dbase.c:259]:
db_postgres_submit_query(): postgres query command failed, connection
status 1, error [no connection to the server#012]
Sep  4 11:31:20 : WARNING: db_postgres [km_dbase.c:259]:
db_postgres_submit_query(): postgres query command failed, connection
status 1, error [no connection to the server#012]
Sep  4 11:31:20 : ERROR: db_postgres [km_dbase.c:267]:
db_postgres_submit_query(): 0x2b11c92b8b18 PQsendQuery Error:  Query:
select
rectime,a_callid,a_uuid,b_uuid,direction,x_via,x_vbranch,x_rr,y_rr,s_rr,x_uri,x_tag,s_method,s_cseq,a_contact,b_contact,as_contact,bs_contact,a_tag,b_tag
from topos_t where
x_vbranch='z9hG4bK66fa.3f007792000000000000000000000000.0'
Sep  4 11:31:20 : ERROR: <core> [db_query.c:132]: db_do_query_internal():
error while submitting query
Sep  4 11:31:20 : ERROR: topos [tps_storage.c:961]: tps_db_load_branch():
failed to query database
Sep  4 11:31:20 : WARNING: topos [tps_storage.c:400]: tps_storage_record():
no local address - do record routing for all initial requests
Sep  4 11:31:20 : WARNING: db_postgres [km_dbase.c:259]:
db_postgres_submit_query(): postgres query command failed, connection
status 1, error [no connection to the server#012]
Sep  4 11:31:20 : WARNING: db_postgres [km_dbase.c:259]:
db_postgres_submit_query(): postgres query command failed, connection
status 1, error [no connection to the server#012]
Sep  4 11:31:20 kamailio[26608]: WARNING: db_postgres [km_dbase.c:259]:
db_postgres_submit_query(): postgres query command failed, connection
status 1, error [no connection to the server#012]
Sep  4 11:31:20 : WARNING: db_postgres [km_dbase.c:259]:
db_postgres_submit_query(): postgres query command failed, connection
status 1, error [no connection to the server#012]
Sep  4 11:31:20 kamailio[26608]: WARNING: db_postgres [km_dbase.c:259]:
db_postgres_submit_query(): postgres query command failed, connection
status 1, error [no connection to the server#012]
Sep  4 11:31:20 : ERROR: db_postgres [km_dbase.c:267]:
db_postgres_submit_query(): 0x2b11c92b8b18 PQsendQuery Error:  Query:
insert into topos_d
(rectime,a_callid,a_uuid,b_uuid,a_contact,b_contact,as_contact,bs_contact,a_tag,b_tag,a_rr,b_rr,s_rr,iflags,a_uri,b_uri,r_uri,a_srcaddr,b_srcaddr,s_method,s_cseq
) values ('2018-09-04 11:31:20','1ff8d1d7606f7416-26611 at 192.168.70.106
','','','','','','','ae86e22a93159b5c6ac75234cdf26c1b-44e5','','','','',0,'','','','','','OPTIONS','10')
Sep  4 11:31:20 kamailio[26608]: WARNING: db_postgres [km_dbase.c:259]:
db_postgres_submit_query(): postgres query command failed, connection
status 1, error [no connection to the server#012]
Sep  4 11:31:20 : ERROR: <core> [db_query.c:235]: db_do_insert_cmd(): error
while submitting query
Sep  4 11:31:20 kamailio[26608]: ERROR: db_postgres [km_dbase.c:267]:
db_postgres_submit_query(): 0x2b11c92b8b18 PQsendQuery Error:  Query:
select
rectime,a_callid,a_uuid,b_uuid,direction,x_via,x_vbranch,x_rr,y_rr,s_rr,x_uri,x_tag,s_method,s_cseq,a_contact,b_contact,as_contact,bs_contact,a_tag,b_tag
from topos_t where
x_vbranch='z9hG4bK86fa.424ded00000000000000000000000000.0'
Sep  4 11:31:20 kamailio[26608]: ERROR: <core> [db_query.c:132]:
db_do_query_internal(): error while submitting query
Sep  4 11:31:20 : ERROR: db_postgres [km_dbase.c:559]:
db_postgres_store_result(): invalid query, execution aborted
Sep  4 11:31:20 kamailio[26608]: ERROR: topos [tps_storage.c:961]:
tps_db_load_branch(): failed to query database
Sep  4 11:31:20 : ERROR: db_postgres [km_dbase.c:561]:
db_postgres_store_result(): driver error: PGRES_FATAL_ERROR,
Sep  4 11:31:20 : WARNING: db_postgres [km_dbase.c:609]:
db_postgres_insert(): unexpected result returned
Sep  4 11:31:20 : ERROR: topos [tps_storage.c:599]: tps_db_insert_dialog():
failed to store message
Sep  4 11:31:20 : ERROR: topos [tps_storage.c:412]: tps_storage_record():
failed to store
Sep  4 11:31:20 : WARNING: db_postgres [km_dbase.c:259]:
db_postgres_submit_query(): postgres query command failed, connection
status 1, error [no connection to the server#012]
Sep  4 11:31:20 : WARNING: db_postgres [km_dbase.c:259]:
db_postgres_submit_query(): postgres query command failed, connection
status 1, error [no connection to the server#012]
Sep  4 11:31:20 : WARNING: db_postgres [km_dbase.c:259]:
db_postgres_submit_query(): postgres query command failed, connection
status 1, error [no connection to the server#012]
Sep  4 11:31:20 : ERROR: db_postgres [km_dbase.c:267]:
db_postgres_submit_query(): 0x2b11c92b8b18 PQsendQuery Error:  Query:
select
rectime,a_callid,a_uuid,b_uuid,direction,x_via,x_vbranch,x_rr,y_rr,s_rr,x_uri,x_tag,s_method,s_cseq,a_contact,b_contact,as_contact,bs_contact,a_tag,b_tag
from topos_t where
x_vbranch='z9hG4bK76fa.d33cc801000000000000000000000000.0'
Sep  4 11:31:20 : ERROR: <core> [db_query.c:132]: db_do_query_internal():
error while submitting query
Sep  4 11:31:20 : ERROR: topos [tps_storage.c:961]: tps_db_load_branch():
failed to query database
Sep  4 11:31:20 : WARNING: topos [tps_storage.c:400]: tps_storage_record():
no local address - do record routing for all initial requests
Sep  4 11:31:20 : WARNING: db_postgres [km_dbase.c:259]:
db_postgres_submit_query(): postgres query command failed, connection
status 1, error [no connection to the server#012]
Sep  4 11:31:20 : WARNING: db_postgres [km_dbase.c:259]:
db_postgres_submit_query(): postgres query command failed, connection
status 1, error [no connection to the server#012]
Sep  4 11:31:20 : WARNING: db_postgres [km_dbase.c:259]:
db_postgres_submit_query(): postgres query command failed, connection
status 1, error [no connection to the server#012]
Sep  4 11:31:20 : ERROR: db_postgres [km_dbase.c:267]:
db_postgres_submit_query(): 0x2b11c92b8b18 PQsendQuery Error:  Query:
insert into topos_d
(rectime,a_callid,a_uuid,b_uuid,a_contact,b_contact,as_contact,bs_contact,a_tag,b_tag,a_rr,b_rr,s_rr,iflags,a_uri,b_uri,r_uri,a_srcaddr,b_srcaddr,s_method,s_cseq
) values ('2018-09-04 11:31:20','1ff8d1d7606f7417-26611 at 192.168.70.106
','','','','','','','ae86e22a93159b5c6ac75234cdf26c1b-917f','','','','',0,'','','','','','OPTIONS','10')
Sep  4 11:31:20 : ERROR: <core> [db_query.c:235]: db_do_insert_cmd(): error
while submitting query
Sep  4 11:31:20 : ERROR: db_postgres [km_dbase.c:559]:
db_postgres_store_result(): invalid query, execution aborted
Sep  4 11:31:20 : ERROR: db_postgres [km_dbase.c:561]:
db_postgres_store_result(): driver error: PGRES_FATAL_ERROR,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180904/5dca6c9b/attachment.html>


More information about the sr-users mailing list