Home > Database > Mysql Tutorial > LInux网站提示“Too many connections”的解决方法

LInux网站提示“Too many connections”的解决方法

WBOY
Release: 2016-06-07 17:52:38
Original
1677 people have browsed it

连接数超过了 MySQL 设置的值,与 max_connections 和 wait_timeout 都有关系。wait_timeout 的值越大,连接的空闲等待就越长,这样就会造成当前连接数越大。

解决方法:

MySQL 服务的配置:修改 MySQL 配置文件(Windows下为 my.ini, Linux下为 my.cnf )中的参数:

 代码如下 复制代码

1.max_connections= 1000
2.wait_timeout = 5

如果没有请自行添加以上两句。

修改后重启 MySQL

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template