- Increase file descriptor limit under Linux to prevent java.net.SocketException: Too many open files
Ran into this with Tomcat on my VPS box: updating /etc/security/limits.conf solved the problem immediately.
(categories: tomcat file_descriptor linux java.net.socketexception )
this is sweeping the problem under the rug and it does work… until you run out of descriptors again.
the best way to go is to fix the app (or have whoever wrote it fix it)
another solution of this kind for you: lambda probe has a “force garbage collection” option. it cleans up nicely; you can hook it up to wget/curl ran once every now and then from crontab. works for most fd leaks as well as memleaks.
cheers,
joanna