内容へ移動
fl8 Wiki
ユーザ用ツール
ログイン
サイト用ツール
検索
ツール
文書の表示
以前のリビジョン
バックリンク
最近の変更
メディアマネージャー
サイトマップ
ログイン
>
最近の変更
メディアマネージャー
サイトマップ
現在位置:
Dokuwiki.fl8.jp
»
01_linux
»
11_データベース
»
01_mysql
»
02 MySQL max_connections
トレース:
01_linux:11_データベース:01_mysql:02_max_connection
この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。
====== 02 MySQL max_connections ====== ===== 確認方法 ===== <code console> mysql> show GLOBAL VARIABLES LIKE "max_%"; +----------------------------+----------------------+ | Variable_name | Value | +----------------------------+----------------------+ | max_allowed_packet | 16777216 | | max_binlog_cache_size | 18446744073709547520 | | max_binlog_size | 1073741824 | | max_binlog_stmt_cache_size | 18446744073709547520 | | max_connect_errors | 10 | | max_connections | 500 | | max_delayed_threads | 20 | | max_error_count | 64 | | max_heap_table_size | 16777216 | | max_insert_delayed_threads | 20 | | max_join_size | 18446744073709551615 | | max_length_for_sort_data | 1024 | | max_long_data_size | 16777216 | | max_prepared_stmt_count | 16382 | | max_relay_log_size | 0 | | max_seeks_for_key | 18446744073709551615 | | max_sort_length | 1024 | | max_sp_recursion_depth | 0 | | max_tmp_tables | 32 | | max_user_connections | 0 | | max_write_lock_count | 18446744073709551615 | +----------------------------+----------------------+ </code> 起動している間に、最高どこまでコネクションされたか。 <code console> mysql> show status like 'Max%'; +----------------------+-------+ | Variable_name | Value | +----------------------+-------+ | Max_used_connections | 186 | +----------------------+-------+ 1 row in set (0.01 sec) </code> 現在のコネクション数。 <code console> mysql> show status like 'Threads_connected%'; +-------------------+-------+ | Variable_name | Value | +-------------------+-------+ | Threads_connected | 63 | +-------------------+-------+ 1 row in set (0.00 sec) </code> ===== エラーログ ===== Apache側でエラーが出る。 <code console> # more /var/log/httpd/error_log [Fri Feb 22 05:00:49 2013] [error] [client 111.111.111.111] PDO Connection Error: SQLSTATE[08004] [1040] Too many connections </code> ===== 対応 (max_connectionsを増やす) ===== <code console> mysql> set global max_connections=450; </code>
01_linux/11_データベース/01_mysql/02_max_connection.txt
· 最終更新: 2022/07/19 06:55 by
matsui
ページ用ツール
文書の表示
以前のリビジョン
バックリンク
文書の先頭へ