<分区>
我一直在我的 mysql 错误日志中收到这个。
5 [Note] Aborted connection 5 to db: 'dbname' user: 'dbuser' host: 'localhost' (Got an error reading communication packets)
梳理 php 代码并确保在我的脚本即将完成时调用 mysqli->close 数据库资源。
我的项目堆栈:apache2.4 与 php-fpm7.2 和 mysql 5.7.25 在 ubuntu 18.10 上。
有什么方法可以让我更深入地了解这个问题?
刚刚检查了防火墙,但它是不活动的
sudo ufw status
Status: inactive
我发现了这个问题。在关闭数据库连接之前,我没有清除所有结果,所以我只是使用 php 明确清除所有结果,然后我让 db->close。/var/log/mysql/error.log 中的日志行消失了。