Hi folks,
I have run into a situation in which a system is exhausting the limit on the
number of open files per process and I want to confirm my understanding of
why it is happening. Yes, the system is configured with the default on linux
which is 1024 which is way too little for geoserver, and yes I do intend to
up the limit but I wanted to bring up the issue for discussion anyways in
case there is a better solution.
For reference the system configuration is linux, running tomcat with a max
heap of 2G, again with the default of 1024 open file handles per process. I
have a layer that is a geotiff and i more or less just bombard it with
requests. While I do that I watch the output of lsof and grep for that file.
And slowly the number of file handles open for that file grows until the
system starts to complain about too many open files and requests start
failing.
Looking at how file streams are managed it looks like the stream is
opened/created when the jai imageread operation is created. And then the
stream is not closed until its finalizer is invoked. Is my understanding
correct? So long story short the file handles accumulate until a garbage
collection occurs which we have no real control over. And in systems that
run with a decent amount of memory the problem is actually worse.
Anyways, just looking for a general confirmation that my understanding of
the problem is correct and that I am not missing anything. I imagine other
folks who know much more about jai than i do have run into similar problems
before. Is there any configuration i am missing that can help? Or is the
solution just to up the limit on open files per process?
Thanks all.
-Justin
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel