I have a high traffic EJabberd server deployed, and it crashes very frequently --
Last Error Log:
=ERROR REPORT==== 2007-11-06 11:18:00 ===
** Generic server <0.30198.1> terminating
** Last message in was {sql_query,["select username, jid, nick, subscription, ask, askmessage, server, subscribe, type from rosterusers where username='",
"jadeddesperation",
"'"]}
** When Server state == {state,<0.30199.1>,mysql}
** Reason for termination ==
** {function_clause,[{mysql,get_result_reason,["query timed out"]},
{ejabberd_odbc,mysql_to_odbc,1},
{ejabberd_odbc,handle_call,3},
{gen_server,handle_msg,6},
{proc_lib,init_p,5}]}
===========================================
It seems that the error generally happens because I have enabled MySQL authentication using native "pre-compiled" mysql driver from process-one site.
Can anyone let me know if these errors are "usual" or is there something wrong with my setup?
Also, if the general feeling is that these errors may be removed after moving back to Mnesia, is there a script that would allow me to migrate back from mysql to mnesia?
MySQL timeout
The error message says that a mysql query failed due to timeout: the mysql server didn't answer in a lapse of time, and ejabberd got nervous and complained. Maybe the query was very complex, or the mysql was too busy, or there was a communication problem.
The first thing you can try is to increase the timeout in ejabberd code, check theMySQL timeout page.
If that's the only problem you have, I recommend to try to fix it instead of changing all the database backend.