S
S
Sergey Ivanchenko2017-07-23 21:45:40
linux
Sergey Ivanchenko, 2017-07-23 21:45:40

Why does java in linux create descriptors to jar files of dependencies for each thread?

Faced the problem of a large number of file descriptors in the system. Checked with lsof. And I noticed that file descriptors are created for each java stream for each jar file in the dependencies folder. The total is descriptors = number of threads * number of dependency files. Which, with a large number of files in dependencies, creates a problem.
Why is it so arranged in the JVM? And is it possible to require jar file descriptors to be reused between threads?
(There is an option - fat jar, but it is not convenient for deployment)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question