Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Too many connections error

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Today we reported that our website was down, the log error was too many connections error, below to investigate the root cause.

My initial suspicion is that max_connections is too small.

Why hasn't this error occurred before? Could it be an increase in business? Or is it Internet ***?

Basic knowledge:

To solve the problem of too many connections, you can start with two parameters:

max_connections and wait_timeout and interactive_timeout

interactive_timeout: The number of seconds the server waits for activity before closing the interactive connection.

wait_timeout: Number of seconds the server waits for activity before closing a non-interactive connection.

These two parameters must be used together. Otherwise, setting wait_timeout alone is invalid

View the maximum number of connections set and the number of connections already used:

show variables like "%max_connection%";

show status like "%used%";

Set the maximum number of connections:

set GLOBAL max_connections=256;(temporary)

max_connections=N in profile modification (permanent)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report