MySQL server has gone away

查看错误日记路径:

show variables like 'log_error';

日志中显示:

[Warning] File Descriptor 1832 exceeded FD_SETSIZE=1024

我发现我的table_open_cache参数值是2000。这明显超过了日志中最大值1024,所以将MySQL此值缩小。

修改/etc/my.cnf:

[mysqld]
table_open_cache=500

show variables like ‘table_open_cache’;
show variables like ‘max_connections’;

来源:https://www.geekgao.cn/archives/35

原文地址:https://www.cnblogs.com/shaoyang0123/p/14003715.html