mod_log_chat_mysql5 icon indicating copy to clipboard operation
mod_log_chat_mysql5 copied to clipboard

Lost connection to MySQL after unexpected server restart.

Open fk0 opened this issue 12 years ago • 2 comments

I can't get module to work after restarting DB server, just don't see messages are logged there. Module restart via web GUI does not seem to work either. Also tried ejabberdctl update and it didn't help. I suppose start/stop module behavior is not correct.

How can I make sure it will be working after restart? Does the module track the status of DB and reconnects properly after table is checked?

fk0 avatar Aug 10 '12 10:08 fk0

Here's what erlang.log shows =CRASH REPORT==== 10-Aug-2012::14:07:51 === crasher: initial call: mod_log_chat_mysql5:init/1 pid: <0.1724.0> registered_name: [] exception exit: pool_already_exists in function gen_server:init_it/6 ancestors: [ejabberd_sup,<0.37.0>]
messages: []
links: [<0.250.0>]
dictionary: []
trap_exit: false
status: running
heap_size: 610
stack_size: 24
reductions: 1203
neighbours:

fk0 avatar Aug 10 '12 11:08 fk0

fixed the issue manually by invoking:

  1. ejabberdctl debug
  2. emysql:remove_pool(mod_log_chat_mysql5_db).

I think this issue happens due to missing handling of hanged up pool which couldn't be re-used at the module start.

fk0 avatar Aug 10 '12 15:08 fk0