Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

294
Vistas
Troubleshooting a Java program that causes a server to hang with "too many files open"

I have a Java program runs (on linux) for a while and then causes the server to lock up with "Too many files open"

After restarting the machine, I run the java program again and then execute the lsof command against it's pid. A large number of lines with the following output are produced:

java    971 uknown  980u     sock                0,9       0t0  20461 protocol: TCPv6

Does this means the program is opening multiple tcp connections & not closing them?

What further steps can i take to troubleshoot this?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

It means your program is opening file descriptors but not closing them. It may be sockets or file handlers. So it is causing resource leak. Make sure all file handlers are closed and make it ready for garbage collected.

As dan1st pointed out in comment, one preventive measure to avoid this scenario is using try-with-resources. This will implements the AutoClosable interface and make sure automatic resource closing.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda