Asterisk stop after mysql timeout

Hello,

I have an Asterisk application that connect to external mysql sever (other machine). It was working for one year, but this week some problems occurs.

The Asterisk stop for some minutes. The log shows some mysql server has gone away. And, typing “show channels verbose” we could see many calls “locked” for long minutes.

It stay stopped for some minutes, than returns to work.

Any help?

Tanks.