Home > Database > Mysql Tutorial > body text

mysql中TIME_WAIT过多导致查询慢解决办法

WBOY
Release: 2016-06-07 17:53:00
Original
1409 people have browsed it

如果你的mysql出现大量的TIME_WAIT,导致这个问题的原因一般是你程序上优化不到位或是有大量的查询不合理造成了,我们只要简单的处理即可解决

对此的调优方法如下

 代码如下 复制代码

vim /etc/sysctl.conf

加入以下内容:

 代码如下 复制代码

net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30

即可解决了

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