Home

ENFILE

ENFILE is an errno value used by POSIX-compliant kernels to indicate that the system-wide limit on the total number of open files has been reached. It is reported by various system calls that need to allocate a new file descriptor, such as open, accept, or dup, when the global file descriptor table is full and the kernel cannot allocate more descriptors.

In most Unix-like systems, ENFILE stands for "file table overflow." It is defined in errno.h as part

Impact and handling: When ENFILE is returned, the application should release unused file descriptors and other

Notes: ENFILE is one of the standard POSIX error codes and is part of the broader set

of
the
standard
set
of
error
codes.
It
is
distinct
from
EMFILE,
which
means
that
the
calling
process
has
exhausted
its
own
per-process
limit
on
open
files,
even
though
there
may
be
available
descriptors
elsewhere
in
the
system.
resources
and
may
retry
the
operation
later
if
appropriate.
If
ENFILE
persists
under
normal
load,
system
administrators
and
developers
often
address
it
by
adjusting
limits.
Per-process
limits
are
controlled
by
RLIMIT_NOFILE
(commonly
managed
with
ulimit
-n
or
via
limits.conf);
system-wide
limits
are
governed
by
fs.file-max
(or
relevant
kernel
parameters
via
sysctl
or
systemd
configurations).
Increasing
these
values
should
be
done
with
consideration
of
overall
system
capacity
and
workload,
and
may
require
coordinating
changes
across
startup
scripts,
service
units,
and
resource
accounting
tools.
of
resource
exhaustion
signals
in
Unix-like
operating
systems.
Its
practical
meaning
is
an
indication
of
a
system-wide
shortage
of
file
descriptors
rather
than
a
shortage
within
a
single
process.