Opened 12 years ago
Closed 12 years ago
#4115 closed defect (worksforme)
GDAL Raster files (dataset) are only closed in msCleanup
Reported by: | aboudreault | Owned by: | aboudreault |
---|---|---|---|
Priority: | normal | Milestone: | 6.0.2 release |
Component: | MapServer C Library | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | warmerdam, rouault |
Description
The gdal dataset are never closed until msCleanup is called. All files remain open. We can easily checked this using lsof utility. We noticed the issue using python mapscript. We have a twisted web application using python mapscript and we can see that datasets are only closed if we kill the process. I would expect layer.close() to close the dataset as well... but it doesn't. The module probably only call msCleanup on exit.
I would say that FastCGI have the same problem... but I'm not sure yet.. have to test this.
Note:
See TracTickets
for help on using tickets.
Alan, this is "working as intended". The default value for CLOSE_CONNECTION for singleton rasters (as opposed to tileindexed layers) is DEFER. You can explicitly add something like:
to ensure that rasters are not kept open by default. This is a moderately dangerous attempt at optimizing things that can come back to haunt.
Feel free to reopen the ticket if you feel it is really a bug or would like to see this better documented.