几个小时后,我一直失去与MySQL服务器的连接
我有一个python脚本,它可以作为生产线的计数器,它基本上记录了产品通过传感器光束。除此之外,该代码还具有两个线程,可以作为计时器,用于完成MySQL连接何时完成。这是每分钟一次,一个小时。问题在于我不断遇到网络错误,例如
果酱致命错误:网络错误:软件导致连接中止。和 mysql.connector.errors.interfaceError:2003:无法连接到“ IP:port”(101网络不可到达)上的mySQL Sever,
这引起了为什么它显示该消息的问题?由于网络已启动并可用,因此在运行几个小时后发生,该脚本应该整天运行。
I have a python script which works as a counter for a production line that it basically records a product has passed through the sensor's beam. Aside from this, the code has two threads that works as timers for when the MySQL connection is done. Which is one time every minute and once an hour. The problem is that I keep getting network errors, such as
PuTTY Fatal Error: Network Error: Software caused connection abort. And
mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL sever on "IP:port" (101 Network is unreachable)
Which rises the question on why it displays that message? Since the Network is up and available, this happens after some hours after running, the script is supposed to run throughout all day.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论