Bug #4307
closedUpgrade Geoserver to prevent Metacat crashes
0%
Description
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.
1. http://www.google.com/search?q=metacat+%22too+many+open+files%22
2. http://jira.codehaus.org/browse/GEOT-1014
3. http://thread.gmane.org/gmane.comp.gis.geoserver.user/8145
Files
Updated by ben leinfelder over 13 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").
Updated by ben leinfelder over 13 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:
http://en.wikipedia.org/wiki/EAR_(file_format)
-force geoserver configuration (by removing the bypass option). This ensures we are saving the default settings in metacat.properties - and the default settings are the ones we want 99.9% of the time (excluding password)
Updated by ben leinfelder over 13 years ago
I seem to have introduced invalid shapefiles - perhaps when committing them to SVN. Will have to check alternate checkout.
Updated by ben leinfelder over 13 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.