"Too many open files" in dev-mode

Enonic version: 6.11.1
OS: OS X High Sierra

When developing for Enonic XP in dev-mode it sometimes crashes, saying “Too many open files” in the stack trace of the server log.
I can restart the server to get it back to normal operation, but it only lasts for about 30 minutes before crashing again with the same message.


I also getting this error

Enonic XP 7.4.1
OpenJDK 64-Bit Server VM 11.0.8 (AdoptOpenJDK)
Linux 4.15.0-135-generic (amd64)

XP is built on top of Elasticsearch that uses a lot of file descriptors. You might have to allow XP to use more file descriptors on your system.

This is generally done by setting ulimit -n 65535 as root before starting Elasticsearch, or set nofile to 65535 in /etc/security/limits.conf .

1 Like