I'm able to reproduce with mentioned steps.
mysql> set global audit_log_rotate_on_size=524288000;SET GLOBAL audit_log_flush = ON; Query OK, 0 rows affected (0.04 sec)
Query OK, 0 rows affected (0.00 sec)
mysql> show variables like '%audit%'; +-----------------------------+---------------+ | Variable_name | Value | +-----------------------------+---------------+ | audit_log_buffer_size | 1048576 | | audit_log_exclude_accounts | | | audit_log_exclude_commands | | | audit_log_exclude_databases | | | audit_log_file | audit.log | | audit_log_flush | OFF | | audit_log_format | OLD | | audit_log_handler | FILE | | audit_log_include_accounts | | | audit_log_include_commands | | | audit_log_include_databases | | | audit_log_policy | ALL | | audit_log_rotate_on_size | 524288000 | | audit_log_rotations | 0 | | audit_log_strategy | ASYNCHRONOUS | | audit_log_syslog_facility | LOG_USER | | audit_log_syslog_ident | percona-audit | | audit_log_syslog_priority | LOG_INFO | +-----------------------------+---------------+ 18 rows in set (0.00 sec)
$ for i in `seq 10000`; do mysql -e 'select * from mysql.user limit 1'; done
And it just hanged and I can't connect to MySQL server.
However, audit_log_flush shows OFF which is turned ON dynamically. This doesn't seems dynamic variable but doc mentions it's dynamic https://www.percona.com/doc/percona-server/5.6/management/audit_log_plugin.html#audit_log_flush
Interestingly, when I enabled audit_log_flush & audit_log_rotate_on_size from my.cnf after restarting instance I couldn't reproduce same problem.
This completed absolutely fine. It could be related to audit_log_flush handling.
I'm able to reproduce with mentioned steps.
mysql> set global audit_log_ rotate_ on_size= 524288000; SET GLOBAL audit_log_flush = ON;
Query OK, 0 rows affected (0.04 sec)
Query OK, 0 rows affected (0.00 sec)
mysql> show variables like '%audit%'; ------- ------- ------- --+---- ------- ----+ ------- ------- ------- --+---- ------- ----+ buffer_ size | 1048576 | exclude_ accounts | | exclude_ commands | | exclude_ databases | | include_ accounts | | include_ commands | | include_ databases | | rotate_ on_size | 524288000 | syslog_ facility | LOG_USER | syslog_ ident | percona-audit | syslog_ priority | LOG_INFO | ------- ------- ------- --+---- ------- ----+
+------
| Variable_name | Value |
+------
| audit_log_
| audit_log_
| audit_log_
| audit_log_
| audit_log_file | audit.log |
| audit_log_flush | OFF |
| audit_log_format | OLD |
| audit_log_handler | FILE |
| audit_log_
| audit_log_
| audit_log_
| audit_log_policy | ALL |
| audit_log_
| audit_log_rotations | 0 |
| audit_log_strategy | ASYNCHRONOUS |
| audit_log_
| audit_log_
| audit_log_
+------
18 rows in set (0.00 sec)
$ for i in `seq 10000`; do mysql -e 'select * from mysql.user limit 1'; done
And it just hanged and I can't connect to MySQL server.
However, audit_log_flush shows OFF which is turned ON dynamically. This doesn't seems dynamic variable but doc mentions it's dynamic https:/ /www.percona. com/doc/ percona- server/ 5.6/management/ audit_log_ plugin. html#audit_ log_flush
Interestingly, when I enabled audit_log_flush & audit_log_ rotate_ on_size from my.cnf after restarting instance I couldn't reproduce same problem.
$ for i in `seq 10000`; do mysql -e 'select * from mysql.user limit 1'; done
This completed absolutely fine. It could be related to audit_log_flush handling.