Tight loop with [ERROR] Error in accept: Bad file descriptor

I just upgraded to Cluster Server 5.7 and found that my servers were often tight-looping with this error, and filling the disk with their logfiles.

After a little investigation, I find that I can reproduce this tight loop simply by telnetting to localhost on port 3306 and disconnecting (though the actual cause for me was monit doing a status test).

Has anyone else seen this?

Hey there im having the exact same issue on Percona server 5.7.16-10. Do you happen to solve it? Thank in advance.

I also have this issue. Percona 5.7.14-8 on Ubuntu Server 12.04. I’ve had it regularly before and the fix I put into place was based on this thread (adding a ulimit in systemd for a really high max files):


That has been in place for almost 3 months and now it’s appearing again during overnight backups on one of our servers. While I can still log into the server with the local mysql client, TCP connections are no longer available. We can’t use sockets because that has other issues with our software. I also just found this open bug ticket, though there’s no activity on it from the developers:


Any ideas? This is the second bug we have with Percona 5.7 that’s going unresolved.

I’ve stabilised this by setting skip-networking in my.cnf to turn off TCP ports entirely, then using socat to proxy incoming TCP requests on to a Unix socket. That’s quite a hack, but it stops the server going into a tight loop.