Possible problem with JavalinVue when using Location.EXTERNAL - not closing files?
See original GitHub issueActual behavior/steps to reproduce (the bug)
- Set external location
JavalinVue.rootDirectory("/vue", Location.EXTERNAL)
-
(have a large number of
.vue
files in/vue
folder) -
Run something that produces a lot of requests, e.g. scenario tests
-
Produces
java.nio.file.FileSystemException: [...]/src/main/resources/vue: Too many open files
exception
https://gist.github.com/jorunfa/4278f4d0c231d7b54d3348464689d94d
I’ll try to investigate the issue myself.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Possible problem with JavalinVue when using Location.EXTERNAL ...
(have a large number of .vue files in /vue folder). Run something that produces a lot of requests, e.g. scenario tests. Produces java.nio.file....
Read more >Documentation - A lightweight Java and Kotlin web framework
Javalin - A lightweight Java and Kotlin web framework. Create REST APIs in Java or Kotlin easily.
Read more >Why doesn't java.io.File have a close method? - Stack Overflow
Streams can be opened and closed, files cannot. (My personal opinion is that it's rather unfortunate that Sun then went on to create ......
Read more >Fixed: External Hard Drive Recognized But Not Accessible
External hard drive recognized by not opening in computer File Explorer? This article offers 6 fixes to recognized but not accessible ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In the last days I saw something in the code base.
The scanner is never closed, could this be the problem? What about
Files.readAllBytes()
?readAllBytes
seems to work fine in distroless Java container (which was where we had a problem before).I have very little experience with the
Scanner
class, so I’m not sure, but it seems like one of its primary purposes is scanning for input, i.e. from user input throughSystem.in
, but of course other sources are also possible. E.g.:We always read the full .vue file. readAllBytes makes sense to me. Not my area of expertise though.