Hello,
On 3/29/12 7:33 PM, Juha Heinanen wrote:
daniel,
i gave db_cluster module a try. i configured serial connections and it
worked fine: when i stopped mysql server behind the higher priority
connection, queries started to work over the lower priority connection.
there is one thing that bothers me. when higher priority connection is
not available, i get these kind of error to syslog even when queries
succeed over the lower priority connection:
Mar 29 20:24:52 sip /usr/sbin/sip-proxy[18966]: ERROR: db_mysql [km_dbase.c:122]: driver
error on query: Can't connect to MySQL server on '192.98.102.13' (115)
Mar 29 20:24:52 sip /usr/sbin/sip-proxy[18966]: ERROR:<core> [db_query.c:156]:
error while submitting query
it would be nice if those error messages could somehow be suppressed
when one of the connections is still operational and the queries
actually succeed. someone may namely run such incomplete cluster many
hours and during that time syslog will be filled with those (confusing)
error messages.
maybe we should introduce a log_level parameter for mysql and the
other
db modules that can be controlled via config/rpc.
On the other hand, I still have some items in to-do list for the module.
The idea is to disable a connection if a query fails and try to
reconnect either upon a rpc command or after some time or a number
skipped queries. At that time the error should appear only once, at the
moment the problem is detected, eventually repeating from time to time
when the module tries to auto-reconnect. Other suggestions are welcome,
of course!
Cheers,
Daniel
--
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/