简体   繁体   English

如何使ezSQL连接保持活动状态?

[英]How do I keep ezSQL connection alive?

I am using ezSQL in a script that is running in a loop for days, possibly weeks. 我在脚本中使用ezSQL,该脚本在循环中运行了几天甚至几周。 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 但是,经过很长一段时间后,我收到此MySQL错误:MySQL服务器已消失

I guess mysql has disconnected the ezSQL connection? 我猜mysql已经断开了ezSQL连接?

What I wonder... does ezSQL auto-reconnect, because I can't find any reconnect function? 我想知道... ezSQL是否自动重新连接,因为找不到任何重新连接功能? How do you propose I check the connection/health of ezSQL? 您如何建议我检查ezSQL的连接/运行状况?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM