Dana Lambert (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5f03fa8d7e510c0015f4440b
) *created* an issue
GeoServer (
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiMTVkNzUyMmRiZjM3NDA5Y2JjYjU2NTAyNDc0ZDhhMjQiLCJwIjoiaiJ9
) / Bug (
https://osgeo-org.atlassian.net/browse/GEOS-9684?atlOrigin=eyJpIjoiMTVkNzUyMmRiZjM3NDA5Y2JjYjU2NTAyNDc0ZDhhMjQiLCJwIjoiaiJ9
) GEOS-9684 (
https://osgeo-org.atlassian.net/browse/GEOS-9684?atlOrigin=eyJpIjoiMTVkNzUyMmRiZjM3NDA5Y2JjYjU2NTAyNDc0ZDhhMjQiLCJwIjoiaiJ9
) GWC TileLayer preview memory issue (
https://osgeo-org.atlassian.net/browse/GEOS-9684?atlOrigin=eyJpIjoiMTVkNzUyMmRiZjM3NDA5Y2JjYjU2NTAyNDc0ZDhhMjQiLCJwIjoiaiJ9
)
Issue Type: Bug Affects Versions: 2.17.0, 2.17.1 Assignee: Unassigned
Components: GWC Created: 09/Jul/20 5:45 AM Environment:
Ubuntu 18.04
Priority: Medium Reporter: Dana Lambert (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5f03fa8d7e510c0015f4440b
)
A very similar memory issue similar to
https://osgeo-org.atlassian.net/browse/GEOS-9667 occurs when previewing a layer
using geowebcache.
This issue occurs in the `gwc` package, where the metatile `ImageReader` is not
being disposed and `InputStream` is not being closed when of type
`RenderedImageTimeDecorator`.
To fix this, the following snippet can be added to `GeoserverMetaTile` here
https://github.com/geoserver/geoserver/blob/master/src/gwc/src/main/java/org/geoserver/gwc/layer/GeoServerMetaTile.java#L240.
```
if (metaTileImage instanceof RenderedImageTimeDecorator)
{ metaTileImage = ((RenderedImageTimeDecorator) metaTileImage).getDelegate(); }
```
This checks if the `metaTileImage` is of type `RenderedImageTimeDecorator`. If
it is, it sets `metaTileImage` to the delegate `RenderedOp` image. Two unit
tests have been added to test firstly if the reader is disposed and secondly if
the input stream is closed.
Another patch is also needed in geowebcache to add the reader `dispose()` call
as part of the `Metatile` disposal method. This can be achieved by inserting
the following snippet here
https://github.com/GeoWebCache/geowebcache/blob/master/geowebcache/core/src/main/java/org/geowebcache/layer/MetaTile.java#L547
``` } else if (param instanceof ImageReader) {
ImageReader reader = (ImageReader) param;
reader.dispose();
```
I have opened a PR against GeoWebCache to address this issue here
https://github.com/GeoWebCache/geowebcache/pull/869.
(
https://osgeo-org.atlassian.net/browse/GEOS-9684#add-comment?atlOrigin=eyJpIjoiMTVkNzUyMmRiZjM3NDA5Y2JjYjU2NTAyNDc0ZDhhMjQiLCJwIjoiaiJ9
) Add Comment (
https://osgeo-org.atlassian.net/browse/GEOS-9684#add-comment?atlOrigin=eyJpIjoiMTVkNzUyMmRiZjM3NDA5Y2JjYjU2NTAyNDc0ZDhhMjQiLCJwIjoiaiJ9
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100133-
sha1:abe90d4 )_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel