Bug #82870 | mysqld opens too many descriptors for slow query log | ||
---|---|---|---|
Submitted: | 6 Sep 2016 10:07 | Modified: | 12 Jan 2018 20:01 |
Reporter: | Sveta Smirnova (OCA) | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Logging | Severity: | S3 (Non-critical) |
Version: | 5.7.14 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | (no regression here) |
[6 Sep 2016 10:07]
Sveta Smirnova
[7 Sep 2016 9:32]
Sveta Smirnova
FLUSH SLOW LOGS seems to be not working
[7 Sep 2016 10:03]
Sveta Smirnova
General query log affected as well. With log_output='table' things get even worse: descriptor created for each thread running and not closed after.
[7 Sep 2016 14:36]
MySQL Verification Team
Sveta, Thank you for your bug report. I have two questions before I attempt to reproduce your test case: * Did you use our standard built binary, without any patches ??? * Is oltp.lua available with sysbench and if yes, did you use it unchanged ??? Thanks in advance.
[7 Sep 2016 18:10]
Sveta Smirnova
Hi Sinisa, yes and yes. Otherwise I'd mentioned it ;) Btw version of sysbench is 0.5 or 1.0 available from https://github.com/akopytov/sysbench And you can use any lua script which runs queries. What it does does not matter, number of parallel threads matters.
[12 Sep 2016 15:27]
MySQL Verification Team
Hi Sveta, I have been able to repeat the bug with a pretty complex setup that you have provided. The output is in the file attached.
[12 Sep 2016 15:27]
MySQL Verification Team
Console output that shows that bug is repeated
Attachment: output.bug (application/octet-stream, text), 15.13 KiB.
[22 Feb 2017 15:09]
MySQL Verification Team
Hi Sveta, We managed to reproduce the case when our server open too many file descriptors. We were not able to reproduce "Too many files" error. Hence, can you send us your configuration. Is it possible that you might have set the value of 'open_files_limit' lesser than that of 'table_open_cache_instances' ??? If that is the case then there is no need of sending us your config.
[12 Jan 2018 19:59]
Vinicius Malvestio Grippa
This bug is also reproducible in MySQL 5.6.28-76.1-log. I've used the steps that Sveta provided, changing step 4: 4. mysql> set global log_output='table';
[12 Jan 2018 20:01]
Sveta Smirnova
Sinisa, sorry, missed your comment. I do not use any special options, just start mysqld using MySQL Test Framework. It sets everything.
[25 Oct 2018 12:48]
Paul DuBois
Posted by developer: Added a note "Log Tables and “Too many open files” Errors" here: https://dev.mysql.com/doc/refman/8.0/en/log-destinations.html Also added a cross reference to that note here: https://dev.mysql.com/doc/refman/8.0/en/query-log.html https://dev.mysql.com/doc/refman/8.0/en/slow-query-log.html