Bug #4307

Upgrade Geoserver to prevent Metacat crashes

Added by Shaun Walbridge almost 11 years ago. Updated over 9 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


The shapefile building routine isn't releasing file handles it uses when building new shapefiles. This is causing processes which rely on multiple simultaneous files (e.g. Kepler workflows) to fail, and causes intermittent failures within Metacat (e.g. the Google results at [1]). Currently, there are 918 open filehandles on KNB, with 891 of them caused by the unclosed shapfiles.

It looks like this issue was resolved in a newer release of Geotools, which Geoserver relies on for generating shapefiles. Assuming this is our problem (as seen in [2] and [3]), then just upgrading to a newer release of Geoserver should solve the issue. It's possible we could even just upgrade the Jars used to Geotools 2.3 or later, but doing a proper upgrade makes sense since many performance improvements with both geotools and geoserver have been made in the past three years.


tomcat-open-filehandles.txt (137 KB) tomcat-open-filehandles.txt Shaun Walbridge, 08/12/2009 06:49 PM


#2 Updated by ben leinfelder over 9 years ago

We are now using Geotools 2.6.4 (from Geoserver 2.0.2) to read/write the shape files.
Geoserver is deployed in a different context from Metacat but uses the same shapefiles that Metacat edits.
The Geoserver configuration requests three pieces of information:
-the data directory to use (defaults to the pre-configured one we are shipping in Metacat webapp)
-the geoserver webapp context (default to "geoserver" since the war is "geoserver.war")
-the admin password (default is "geoserver").

#3 Updated by ben leinfelder over 9 years ago

keeping this opened until additional tasks are completed:
-package geoserver.war (v2.0.2) along with Metacat's knb.war as an EAR:
-force geoserver configuration (by removing the bypass option). This ensures we are saving the default settings in - and the default settings are the ones we want 99.9% of the time (excluding password)

#4 Updated by ben leinfelder over 9 years ago

I seem to have introduced invalid shapefiles - perhaps when committing them to SVN. Will have to check alternate checkout.

#5 Updated by ben leinfelder over 9 years ago

Shape files were corrupted by the ant build (filtered copy treated them as text).
Configuration allows for bypass and uses sensible default values.
Documentation has been updated to reflect new deployment strategy.
GeoServer is included in the distribution - not EAR since that requires an "Enterprise" webapp server.

#6 Updated by Redmine Admin over 7 years ago

Original Bugzilla ID was 4307

Also available in: Atom PDF