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

**URL:** <https://forums.percona.com/t/tight-loop-with-error-error-in-accept-bad-file-descriptor/5135>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [October 8, 2016, 3:58am UTC](https://forums.percona.com/t/tight-loop-with-error-error-in-accept-bad-file-descriptor/5135 "2016-10-08T03:58:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edward\_Hibbert](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/edward_hibbert/32/993_2.png) [@Edward\_Hibbert](https://forums.percona.com/u/Edward_Hibbert)\
**Post date:** [October 8, 2016, 3:58am UTC](https://forums.percona.com/t/tight-loop-with-error-error-in-accept-bad-file-descriptor/5135/1 "2016-10-08T03:58:00Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![luis.maldonado](https://avatars.discourse-cdn.com/v4/letter/l/0ea827/32.png) [@luis.maldonado](https://forums.percona.com/u/luis.maldonado)\
**Post date:** [December 22, 2016, 1:41pm UTC](https://forums.percona.com/t/tight-loop-with-error-error-in-accept-bad-file-descriptor/5135/2 "2016-12-22T13:41:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![m0nk](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@m0nk](https://forums.percona.com/u/m0nk)\
**Post date:** [January 3, 2017, 9:00am UTC](https://forums.percona.com/t/tight-loop-with-error-error-in-accept-bad-file-descriptor/5135/3 "2017-01-03T09:00:08Z")

</div>

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):

[URL=“[linux - MySQL - 0 [ERROR] Error in accept: Bad file descriptor - Stack Overflow](http://stackoverflow.com/questions/37796693/mysql-0-error-error-in-accept-bad-file-descriptor)”][http://stackoverflow.com/questions/3...ile-descriptor[/URL]](http://stackoverflow.com/questions/3...ile-descriptor%5B/URL%5D)

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:

[URL][https://bugs.launchpad.net/percona-server/+bug/1578253[/URL]](https://bugs.launchpad.net/percona-server/+bug/1578253%5B/URL%5D)

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

---

<div class="post-metadata">

**Author:** ![Edward\_Hibbert](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/edward_hibbert/32/993_2.png) [@Edward\_Hibbert](https://forums.percona.com/u/Edward_Hibbert)\
**Post date:** [February 22, 2017, 5:36pm UTC](https://forums.percona.com/t/tight-loop-with-error-error-in-accept-bad-file-descriptor/5135/4 "2017-02-22T17:36:11Z")

</div>

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.
