Carlo,
Thanks for the advice.  We had already enabled USE_JAI_IMAGEREAD and installed 
native JAI (something I should have mentioned).  Attached is a getCapabilities 
snippet of the layer in question and here is an example URL which causes Tomcat 
to spiral out of memory:
http://localhost:8080/geoserver/Satellite/wms?service=WMS&version=1.1.0&request=GetMap&layers=Satellite:GOES-East_NA_IR&styles=&bbox=-180.0,-90.0,180.0,90.0&width=660&height=330&srs=EPSG:404000&format=application/openlayers&time=2013-10-14T19:45:51Z

Using eclipse as a remote debugger I can examine the Query and FeatureVisitor 
objects being passed into ContentFeatureSource.accepts().  The visitor object 
contains the time, but the query object only appears to specify the layer name 
and a bounding box.  As far as I can tell, JDBCFeatureStore attempts to 
"handleVisitor" which fails due to the requested time not being present in the 
DB.  Processing returns to ContentFeatureSource which then gets a FeatureReader 
based solely on the query (which as noted above does not include the requested 
time filter).  We then enter a while loop iterating over each feature returned 
from the query and creating a FutureTask to load each image.  Once here the web 
request hangs while GeoServer loads each image only to result in an OutOfMemory 
error.

FYI, we're running GeoServer 2.3.0 in Tomcat 7.0.42.

Thanks,

Kevin M. Weiss
Software Engineer
HARRIS IT Services

1408 Fort Crook Road South
Bellevue, NE 68005
kweis...@harris.com
________________________________________
From: geo.ccancelli...@gmail.com [geo.ccancelli...@gmail.com] on behalf of 
carlo cancellieri [carlo.cancelli...@geo-solutions.it]
Sent: Tuesday, October 15, 2013 3:54 AM
To: Weiss, Kevin
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] ImageMosaic out of memory issue

Kevin,
 first of all I would suggest to set USE_JAI_IMAGEREAD to true anyhow as far as 
I remember the ImageMosaic may work as following:
The search is performed filtering over the DB without opening rasters at all, 
then the ImageMosaic may iterate over the selected granules using the 
ContentFeatureSource but if no time is matching in the db the content source 
should be empty and a blank image is produced. Could you provide the query you 
are using and the relevant piece of getcapabilities?
Cheers,
Carlo


2013/10/14 Weiss, Kevin <kweis...@harris.com<mailto:kweis...@harris.com>>
Hello All,

I've been troubleshooting a Java heap space error with temporal ImageMosaic 
datastores.  We originally followed the tutorials here 
(http://docs.geoserver.org/latest/en/user/tutorials/imagemosaic_timeseries/imagemosaic_timeseries.html)
 to setup a temporally enabled raster data store.  After that we designed a 
system which would download new imagery and update the underlying DB table.  
The system works as expected until a request for an invalid timestamp is made.  
It appears that the GeoServer/GeoTools code begins to loop over each image in 
the directory loading it into memory.  When we only had 10-15 images in the 
directory this was unnoticeable, however now that our collection has grown to 
1500+ images it quickly runs us out of heap space.

The code in question appears to be in ContentFeatureSource.java.  In the 
accepts(Query, FeatureVisitor, ProgressListener) method I found the following 
comment:
"//subclass could not handle, resort to manually walkign through"
This comment is just above the while loop that iterates over all the imagery in 
the directory which makes me wonder if this is the intended behavior.

Has anyone else experienced this issue?  Am I configuring something 
incorrectly?  I realize the simple solution is to not make invalid temporal 
requests, but I don't control the external clients and this seems to be a 
pretty big flaw in my opinion.  No external entity should be able to take down 
my server with a simple request.

Thanks,

Kevin M. Weiss
Software Engineer
HARRIS IT Services
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net<mailto:Geoserver-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geoserver-users



--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more 
information.
==

Dott. Carlo Cancellieri
@cancellieric
Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313<tel:%2B39%200584%20962313>
mobile: +39 3371094494<tel:%2B39%203371094494>
fax:   +39 0584 1660272<tel:%2B39%200584%201660272>

http://www.geo-solutions.it<http://www.geo-solutions.it/>
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to