0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

mariadb の max_connections

Posted at

DB Connection Failed... 的な画面になったという話があり、現在の設定を確認した。
デフォルトの、151 となっている。

MariaDB [(none)]> SHOW VARIABLES WHERE `variable_name` = 'max_connections';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 151   |
+-----------------+-------+

どれだけ使われたのかを、次に確認したら、天井を打っていた。デフォルトが 151 だが、プラス 1 された値になっていた。これは、スーパーユーザーの分が足されたためみたいだ。

MariaDB [(none)]> SHOW STATUS WHERE `variable_name` = 'Max_used_connections';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| Max_used_connections | 152   |
+----------------------+-------+

設定ファイルに以下を記述して、サービスを再起動したら、変更できた。

[mysqld]
...(snip)...
Max_connetctions = 500

増やしたことの影響は?

他の設定で、この値をもとに計算しているところがあり、かなり使われているみたいなので、その辺を考慮する必要がありそう。

(参考)
https://mariadb.com/kb/en/server-system-variables/

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?