lets-blade / blade

:rocket: Lightning fast and elegant mvc framework for Java8
https://lets-blade.github.io
Apache License 2.0
5.84k stars 1.17k forks source link

failed: Too many open files error issue #436

Open ebottabi opened 2 years ago

ebottabi commented 2 years ago

Describe the bug

I get this error where the running blade instance throws an exception with message: failed: Too many open files

on a closer look i see: com.blade.exception.TemplateException: java.nio.file.FileSystemException: /home/server/resources/templates/index.html: Too many open files, this file does exist on that path in production and it is the only file within that folder.

when it happens the entire application breaks.

Screenshots:

Screenshot 2022-08-06 at 7 48 06 AM

auula commented 2 years ago
  • System Version: Ubuntu 18.04
  • Build tools: maven
  • JDK Version: 1.8
  • Blade Version: 2.0.15.RELEASE

Describe the bug

I get this error where the running blade instance throws an exception with message: failed: Too many open files

on a closer look i see: com.blade.exception.TemplateException: java.nio.file.FileSystemException: /home/server/resources/templates/index.html: Too many open files, this file does exist on that path in production and it is the only file within that folder.

when it happens the entire application breaks.

Screenshots:

Screenshot 2022-08-06 at 7 48 06 AM

Maybe you have opened too many files, the system kernel also has a file descriptor limit, maybe your static template issues and js, css files are too much, a one-time open file descriptor more than the system limit, you check the kernel error : Too many open files.