0

mySQL サーバーが 15 秒の wait_timeout または interactive_timeout を尊重していません。クエリは、それぞれの 15 秒を超えて進み続けます。以下は my.cnf です -

[mysqld]

# Settings user and group are ignored when systemd is used (fedora >= 15).
# If you need to run mysqld under different user or group,
# customize your systemd unit file for mysqld according to the
# instructions in http://fedoraproject.org/wiki/Systemd
user=mysql
#skip-innodb

#ignore-builtin-innodb
#default-storage-engine = myisam
#log-queries-not-using-indexes

#key_buffer              = 6M
key_buffer_size         = 1024M
max_allowed_packet      = 64M
thread_stack            = 256K
thread_cache_size       = 200
max_connections         = 200
table_cache             = 128K
tmp_table_size          = 24M
max_heap_table_size     = 24M
join_buffer_size        = 1M
query_cache_limit       = 32M
query_cache_size        = 8M
read_buffer_size        = 1M
# concurrent_insert       = ALWAYS

general_log = 0
general_log_file = /var/log/mysql/general.log

low_priority_updates=1

log_warnings=2
#log_error=/var/log/mysql/mysql_error.log
slow-query-log                  = 1
slow-query-log-file = /var/log/mysql/mysql-slow.log
long_query_time=1

wait_timeout=15
interactive_timeout=15

datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

# InnoDB Settings
innodb_buffer_pool_size = 768M
innodb_log_file_size = 100M
innodb-file-per-table          = 1

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

# Semisynchronous Replication
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html
# uncomment next line on MASTER
#;plugin-load=rpl_semi_sync_master=semisync_master.so
# uncomment next line on SLAVE
#;plugin-load=rpl_semi_sync_slave=semisync_slave.so

# Others options for Semisynchronous Replication
#;rpl_semi_sync_master_enabled=1
#;rpl_semi_sync_master_timeout=10
#;rpl_semi_sync_slave_enabled=1

# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html
#;performance_schema

#log-queries-not-using-indexes

default-storage-engine=MyISAM
#log-queries-not-using-indexes

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

サーバーでコマンドを実行しましたが、mytop を実行すると、15 秒を超えるクエリがあります。

mysql> select @@global.wait_timeout, @@session.wait_timeout;
+-----------------------+------------------------+
| @@global.wait_timeout | @@session.wait_timeout |
+-----------------------+------------------------+
|                    15 |                     15 |
+-----------------------+------------------------+
1 row in set (0.00 sec)

私が間違っていることはありますか?

4

1 に答える 1

1

wait_timeout次のように文書化されています。

非対話型接続を閉じる前に、サーバーが非対話型接続のアクティビティを待機する秒数。このタイムアウトは、TCP/IP および Unix ソケット ファイル接続にのみ適用され、名前付きパイプまたは共有メモリを使用して確立された接続には適用されません。

あなたの質問から、それを使用しようとしていて、interactive_timeout長時間実行されるクエリを突然放棄しようとしているように思えます。しかし、それはそのためのものではありません。

于 2013-05-01T17:49:26.597 に答える