[op5-users] merlind crash after loosing mysql connection
Andreas Ericsson
ae at op5.se
Mon Aug 31 10:38:27 CEST 2009
nicolas.raspail at bnpparibas.com wrote:
> Hi
>
> Merlind (version 0.6.2-beta5) crash if it loose the connection with the
> MySQL. My sql server is running inside a cluster, and for some reasons, I
> have switched it to another node. To be sure that everything is okay, I
> have checked the log of merlin. As expected, I see the following message :
>
> [1251471412] 6: dbi_conn_query_null(): Failed to run [SELECT host_name,
> current_state, state_type FROM merlindb.host ORDER BY host_name]: 2006:
> MySQL server has gone away
>
> But what is not expected is the fact that no more merlind process is
> running.
Do you mean that no merlind process is running, or that only one is?
> I have see the same behaviour with the beta2 as reported in a
> previous email and Andreas answered :
> "Hmm. It should try to reconnect at that point instead. Not sure if it did
> that in beta2."
>
It should, although it log that it does. What version of libdbi are you
using? There has been some changes to the error handling in recent versions
of libdbi, so perhaps your version no longer returns DBI_ERROR_NOCONN when
it notices the database connection has died. I'll run some tests and add
some logging and make sure it at least tries to reconnect.
> It seems that even with the beta5, merlind is not trying to reconnect
>
Well, the code in sql.c hasn't changed between beta5 and beta10, so it
wouldn't help to upgrade for this particular problem.
I'll get back to you in an hour when I've run those tests.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
More information about the op5-users
mailing list