[mapserver-users] Java MapScript on Tomcat servlet does not free GeoTIFF file handles

Even Rouault even.rouault at spatialys.com
Fri May 22 06:27:17 PDT 2020


> Problem 1:
> Tomcat-process does not free GeoTIFF file-handles per (pooling) thread.
> With "Resource Monitor" of Windows, it is confirmed that Tomcat8.exe is
> holding file-handles of "foobar.tif".
> 
> MapFile:
>     MAP
>         ...
>         LAYER
>             TYPE RASTER
>             STATUS ON
>             DATA "foobar.tif"
>         END
>     END
> 

You probably need to add
	 PROCESSING "CLOSE_CONNECTION=ALWAYS"
in your LAYER definition

By default, datasets of raster layers are kept open until MapServer is terminated.

CLOSE_CONNECTION is described in https://mapserver.org/mapfile/layer.html, but as far as I 
can see, not explicit about this particular behaviour of raster layers where the default is 
DEFER.
The "documentation" is at:
https://github.com/mapserver/mapserver/blob/
c4006da79bc59e30478d9e2354070ffb9dcbc614/mapraster.c#L675

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200522/14703a16/attachment.html>


More information about the mapserver-users mailing list