Hello,
On Debian 8, after upgrading from Percona 5.6 to 5.7, the database crash randomly after some time and start flooding error logs with the message "[ERROR] Error in accept: Bad file descriptor" until it completely fill the disk.
Here is the full error log :
2016-05-04T08:35:06.313297Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.11-4-log) starting as process 14046 ...
2016-05-04T08:35:06.328826Z 0 [Note] InnoDB: PUNCH HOLE support available
2016-05-04T08:35:06.328880Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-05-04T08:35:06.328887Z 0 [Note] InnoDB: Uses event mutexes
2016-05-04T08:35:06.328893Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2016-05-04T08:35:06.328898Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-05-04T08:35:06.328902Z 0 [Note] InnoDB: Using Linux native AIO
2016-05-04T08:35:06.329662Z 0 [Note] InnoDB: Number of pools: 1
2016-05-04T08:35:06.329812Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2016-05-04T08:35:06.339802Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2016-05-04T08:35:06.348418Z 0 [Note] InnoDB: Completed initialization of buffer pool
2016-05-04T08:35:06.351685Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2016-05-04T08:35:06.371604Z 0 [Note] InnoDB: Crash recovery did not find the parallel doublewrite buffer at /var/lib/mysql/xb_doublewrite
2016-05-04T08:35:06.372968Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2016-05-04T08:35:06.396337Z 0 [Note] InnoDB: Created parallel doublewrite buffer at /var/lib/mysql/xb_doublewrite, size 3932160 bytes
2016-05-04T08:35:06.520305Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2016-05-04T08:35:06.520381Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2016-05-04T08:35:06.589968Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2016-05-04T08:35:06.590806Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2016-05-04T08:35:06.590818Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2016-05-04T08:35:06.592041Z 0 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.7.11-4 started; log sequence number 22679190289
2016-05-04T08:35:06.592577Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2016-05-04T08:35:06.592882Z 0 [Note] Plugin 'FEDERATED' is disabled.
2016-05-04T08:35:06.756371Z 0 [Note] InnoDB: Buffer pool(s) load completed at 160504 10:35:06
2016-05-04T08:35:12.960807Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2016-05-04T08:35:12.960840Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2016-05-04T08:35:12.969917Z 0 [Warning] CA certificate ca.pem is self signed.
2016-05-04T08:35:12.969997Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2016-05-04T08:35:12.970886Z 0 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
2016-05-04T08:35:12.970910Z 0 [Note] - '0.0.0.0' resolves to '0.0.0.0';
2016-05-04T08:35:12.970925Z 0 [Note] Server socket created on IP: '0.0.0.0'.
2016-05-04T08:35:13.038507Z 0 [Note] Event Scheduler: Loaded 0 events
2016-05-04T08:35:13.047408Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.11-4-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Percona Server (GPL), Release '4', Revision '5c940e1'
2016-05-04T11:45:13.696841Z 0 [ERROR] Error in accept: Bad file descriptor
2016-05-04T11:45:13.696978Z 0 [ERROR] Error in accept: Bad file descriptor
2016-05-04T11:45:13.697059Z 0 [ERROR] Error in accept: Bad file descriptor
[...]
In my /etc/security/limits.conf I have the following :
mysql hard nofile 102400
mysql soft nofile 102400
And I have also set LimitNOFILE=102400 in my /lib/systemd/system/mysql.service file.
You can also find in attachment my MySQL configuration file.
Same here, after upgrade from 5.6 to 5.7, about 1-1.5 running:
2016-11- 03T06:30: 14.614519Z 0 [ERROR] Error in accept: Bad file descriptor 03T06:30: 14.614592Z 0 [ERROR] Error in accept: Bad file descriptor 03T06:30: 14.614665Z 0 [ERROR] Error in accept: Bad file descriptor 03T06:30: 14.614738Z 0 [ERROR] Error in accept: Bad file descriptor 03T06:30: 14.614793Z 0 [ERROR] Error in accept: Bad file descriptor 03T06:30: 14.614841Z 0 [ERROR] Error in accept: Bad file descriptor 03T06:30: 14.614890Z 0 [ERROR] Error in accept: Bad file descriptor 03T06:30: 14.614948Z 0 [ERROR] Error in accept: Bad file descriptor 03T06:30: 14.861525Z 0 [ERROR] Error in accept: Socket operation on non-socket 03T06:30: 14.861607Z 0 [ERROR] Error in accept: Socket operation on non-socket 03T06:30: 14.861688Z 0 [ERROR] Error in accept: Socket operation on non-socket 03T06:30: 14.861769Z 0 [ERROR] Error in accept: Socket operation on non-socket 03T06:30: 14.861850Z 0 [ERROR] Error in accept: Socket operation on non-socket 03T06:30: 14.861931Z 0 [ERROR] Error in accept: Socket operation on non-socket 03T06:30: 14.862014Z 0 [ERROR] Error in accept: Socket operation on non-socket 03T06:30: 14.862098Z 0 [ERROR] Error in accept: Socket operation on non-socket
2016-11-
2016-11-
2016-11-
2016-11-
2016-11-
2016-11-
2016-11-
[...]
2016-11-
2016-11-
2016-11-
2016-11-
2016-11-
2016-11-
2016-11-
2016-11-