ENFILE (errno 23)

errno 23

LINUX

File table overflow

Linux terminal running strace with the failing system call and errno highlighted
Linux errno: trace the exact failing system call before changing anything.

What it means

ENFILE is a Linux error code reported by Linux and other POSIX systems. Its official message is: “File table overflow”

How to fix ENFILE (errno 23)

  1. ENFILE is the system-wide open-file table limit: compare 'cat /proc/sys/fs/file-nr' with 'sysctl fs.file-max'
  2. Find the processes holding the most descriptors: 'lsof -n | awk "{print $2}" | sort | uniq -c | sort -rn | head'
  3. Fix the descriptor leak in the offending service, or raise the kernel limit: 'sysctl -w fs.file-max=<value>' (persist in /etc/sysctl.d/)

Related errors

Source: Linux kernel errno.h

Last updated: