[SR-Users] database reconnection db_unixodbc
Karthik Srinivasan
ksriniva2002 at gmail.com
Fri Jan 18 18:28:09 CET 2019
Hello,
I am testing how kamailio reacts to various database conditions. One such
condition is if the database engine is simply shut down (that is, database
server process no longer running, tcp listening socket closed, etc...)
I am utilizing the db_unixodbc module to connect to an Informix database
engine.
I am currently running on Kamailio version 5.0.
I have a test query that executes against the database engine every 10
seconds.
Here is what i have noticed if i shut down the database engine at some
point after i run Kamailio.
the first test query that attempts to run against the db engine fails; it
tries to reconnect and fails.
The second test query (10 seconds after the 1st) results in a SIG_CHILD and
shuts down the entire Kamailio process.
Has anyone experienced this? Is there a solution to this? Ideally the
second query should also fail and return gracefully; and ideally queries
continue to fail until the database engine is back up.
See logs below:
Jan 17 20:07:25 [29297]: INFO: (s) SQL query: FIRST TEST QUERY
Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [dbase.c:135]:
db_unixodbc_submit_query(): rv=-1. Query= FIRST TEST QUERY
Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [connection.c:220]:
db_unixodbc_extract_error():
unixodbc:SQLExecDirect=08S01:1:-11020:[Informix][Informix ODBC
Driver]Communication link failure.
Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [dbase.c:59]: reconnect():
Attempting DB reconnect
Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [dbase.c:74]: reconnect():
failed to connect
Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [connection.c:220]:
db_unixodbc_extract_error():
unixodbc:SQLDriverConnect=08002:1:0:[unixODBC][Driver Manager]Connection
name in use
Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [connection.c:220]:
db_unixodbc_extract_error():
unixodbc:SQLDriverConnect=HY010:2:-11067:[Informix][Informix ODBC
Driver]Function sequence error.
Jan 17 20:07:25 [29297]: ERROR: <core> [db_query.c:181]: db_do_raw_query():
error while submitting query
Jan 17 20:07:25 [29297]: ERROR: sqlops [sql_api.c:265]: sql_do_query():
cannot do the query FIRST TEST QUERY
Jan 17 20:07:25 [29297]: INFO: (s) [123] SQL ret: fail (-1)
Jan 17 20:07:25 [29297]: INFO: (s) [123] SQL res: no rows
Jan 17 20:07:35 [29297]: INFO: (s) [123] SQL query: 10 seconds later the
SECOND TEST QUERY (it's the same query as the first one)
Jan 17 20:07:35 [29301]: CRITICAL: <core> [core/pass_fd.c:277]:
receive_fd(): EOF on 28
Jan 17 20:07:35 [29283]: ALERT: <core> [main.c:744]: handle_sigs(): child
process 29297 exited by a signal 11
Jan 17 20:07:35 [29283]: ALERT: <core> [main.c:747]: handle_sigs(): core
was not generated
Jan 17 20:07:35 [29283]: INFO: <core> [main.c:759]: handle_sigs():
terminating due to SIGCHLD
Jan 17 20:07:35 [29301]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29295]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29291]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29288]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29300]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29284]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29286]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29293]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29289]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29287]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29292]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29296]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29298]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29299]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29285]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29294]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29290]: INFO: <core> [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29283]: INFO: <core> [core/sctp_core.c:53]:
sctp_core_destroy(): SCTP API not initialized
Thank you,
Karthik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190118/6066812e/attachment.html>
More information about the sr-users
mailing list