O
Oz Levanon
Hi. I'm running a tomcat server on Linux (2.4.20-8smp) with a constant
load of users sending requests to it.
I've noticed that the number of used file-descriptors on the machine
increases with time (I use "lsof -a -d 0-10000000 | wc -l" to count
the number of used file-descriptors). Once in a while, supposedly when
the GC runs, the number goes down, but over long periods of time it
steadily increases.
I take this to mean that I have a leak somehwere.
I wanted to ask if I have to explicitly close all open files (using
FileInputStream.close and similar methods) in order to free
file-descriptors, or is it taken care of automatically by the GC
whenever it runs?
TIA, Oz.
load of users sending requests to it.
I've noticed that the number of used file-descriptors on the machine
increases with time (I use "lsof -a -d 0-10000000 | wc -l" to count
the number of used file-descriptors). Once in a while, supposedly when
the GC runs, the number goes down, but over long periods of time it
steadily increases.
I take this to mean that I have a leak somehwere.
I wanted to ask if I have to explicitly close all open files (using
FileInputStream.close and similar methods) in order to free
file-descriptors, or is it taken care of automatically by the GC
whenever it runs?
TIA, Oz.