Bug #81032 Confusing Error message for file limit
Submitted: 11 Apr 2016 14:54 Modified: 11 Apr 2016 18:32
Reporter: Peter Zaitsev Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.5/5.6/5.7 OS:Linux
Assigned to: CPU Architecture:Any

[11 Apr 2016 14:54] Peter Zaitsev
Description:
Observing this in the error log:

2016-04-03T19:42:35.533161Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 20485)
2016-04-03T19:42:35.533305Z 0 [Warning] Changed limits: max_connections: 214 (requested 4096)
2016-04-03T19:42:35.533313Z 0 [Warning] Changed limits: table_open_cache: 400 (requested 2000)

This is confusing messaging as it does not point to the actual issue (failing the call to increase the max files) but rather simply says what MySQL chose to reduce it

How to repeat:
Start MySQL setting max_connections=1000 not setting open_files_limit 

Suggested fix:
Change message to say what MySQL process tried to set number of open files to the computed value needed to support desired number of connections but could not do it, so it was adjusted
[11 Apr 2016 16:31] MySQL Verification Team
Thank you for the bug report.

[miguel@tikal dbs]$ 5.7/mysqld --max_connections=1000
-bash: 5.7/mysqld: No such file or directory
[miguel@tikal dbs]$ 5.7/bin/mysqld --max_connections=1000
2016-04-11T16:24:53.277366Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5010)
2016-04-11T16:24:53.277498Z 0 [Warning] Changed limits: max_connections: 214 (requested 1000)
2016-04-11T16:24:53.277504Z 0 [Warning] Changed limits: table_open_cache: 400 (requested 2000)
2016-04-11T16:24:53.429899Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-04-11T16:24:53.430488Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2016-04-11T16:24:53.430536Z 0 [Note] 5.7/bin/mysqld (mysqld 5.7.13-debug) starting as process 3322 ...
<CUT>
2016-04-11T16:24:54.520712Z 0 [Note] 5.7/bin/mysqld: ready for connections.
Version: '5.7.13-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
---------------------------------------------------------------------------------
[miguel@tikal dbs]$ 5.6/bin/mysqld --max_connections=1000
2016-04-11 13:27:41 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server osee documentation for more details).
2016-04-11 13:27:41 0 [Note] 5.6/bin/mysqld (mysqld 5.6.31-debug) starting as process 3429 ...
2016-04-11 13:27:41 3429 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5010)

2016-04-11 13:27:41 3429 [Warning] Buffered warning: Changed limits: max_connections: 214 (requested 1000)

2016-04-11 13:27:41 3429 [Warning] Buffered warning: Changed limits: table_open_cache: 400 (requested 2000)
------------------------------------------------------------------------------
[miguel@tikal dbs]$ 5.5/bin/mysqld --max_connections=1000
160411 13:28:52 [Note] 5.5/bin/mysqld (mysqld 5.5.50-debug) starting as process 3534 ...
160411 13:28:52 [Warning] Changed limits: max_open_files: 1024  max_connections: 214  table_cache: 400
160411 13:28:52 InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!
160411 13:28:52 InnoDB: The InnoDB memory heap is disabled
[11 Apr 2016 18:32] Peter Zaitsev
Hi Miguel,

Thank you for verifying bug quickly!