I’ve been experiencing this for almost two years without ever understanding what is really going on or how to fix it. I’m running an Asterisk 18.104.22.168 box that does some regular ODBC queries to an Informix database. The caller inputs an associate ID and Asterisk get his name and other info via this query.
When all is working well, everything is perfect. Not a single problem.
When the database goes down, Asterisk just can’t keep going. It freezes. All numbers are busy. You type commands in the console but they don’t seem to respond. The fix is always to disable the DSN in the res_odbc.conf file and then issue a “service asterisk restart”. The section is as follows:
enabled => yes (this is where I disable it by putting “no” and restarting Asterisk)
pre-connect => yes
connect_timeout => 2
dsn => spmcli
username => (username)
password => (password)
sanitysql => select count(*) from systables;
negative_connection_cache => 300
Even the debugging stops when the freeze happens, without any meaningful message explaining what happened.
Anyone knows what can I do to make Asterisk just keep going if the database goes down instead of stopping all operations?