在workerman中,使用timer()执行定时任务,操作PDO和Redis时候报错send of 46 bytes failed with errno=10054

有名的朋友八百

workerman团队您好:
在timer()中执行定时任务,偶尔会出现这种错误:
Redis::rPush(): send of 46 bytes failed with errno=10054
PDO::prepare(): send of 53 bytes failed with errno=10053
请问和Timer()模块有关吗?有没有方案可以解决呢?

3756 1 0
1个回答

six

redis连接 mysql连接因为长时间不通讯被redis/mysql服务端断开了,弄个定时器定时请求下redis/mysql 保持连接活跃。
或者用完redis/mysql就关闭连接,下次用再重新连。

年代过于久远,无法发表回答
🔝