On Dienstag, 30. Juni 2009, logivoip@gmail.com wrote:
> I have configured two redundant DB sources in my kamailio confiuration.
> The DB's are accessed from Kamailio for redundancy pruposes.
> Kamailio and the primary DB are on the same hardware node. The secondary
> DB is on a remote host.
> If Kamailio is up and both MySQL DB's are up, the config works like a
> charm. If the primary or the secondary DB becomes unreachable while
> Kamailio is up, the config handles the exception and all works well.


Hi JR,


ok, fine so far.


> However, if any of the DB servers becomes unreachable and Kamailio is
> restarted, Kamailio can no longer start.
> [..]


It seems that the module want to check if its can reach all configured databases during startup. This is probably required just to make sure that the user did not make a mistake in the configuration, the DBs are reachable and so on.


> What is the proper way of using multiple database servers with Kamailio?


May i ask what kind of functionality you miss? I'd think that you need at least one DB during startup for the server, to be used from sqlops. One possibility would be to add later a new connection to the module, for example with a FIFO command when it gets available, but this is not implemented at the moment.


Instead of handling the outage of DBs in the kamailio server another option would be to implement a failover setup (heartbeat+drdb for example) on the DB level, or use a clustering solution (e.g. mysql cluster).


Henning