0
votes

I am using ezSQL in a script that is running in a loop for days, possibly weeks. The connection is defined and created outside of the loop. However when a long time passes I get this MySQL error: MySQL server has gone away

I guess mysql has disconnected the ezSQL connection?

What I wonder... does ezSQL auto-reconnect, because I can't find any reconnect function? How do you propose I check the connection/health of ezSQL?

1
Why don't you put the connection inside the loop and redefine the connection after some arbitrary number of iterations? - Wes Crow
I think ping is the proper way to go - emorling

1 Answers