Closed emilecantin closed 8 years ago
Hi,
Can you give me the base mapserver version and node-mapserv version you're using as well as post a minimal script replicating the problem? I tried the mapfile you posted with the example/wms-server.js
script: the script died with the error MapserverError: Could not load mapfile
. You say...
When calling mapserv.Map.FromFile on this file, the file stays open.
Do you mean there is an open filehandle to the mapfile when you handle the error and keep the node process running?
Thanks.
I've replicated the problem and it turns out it's an upstream issue with the core mapserver code: I have filed an issue about it at mapserver/mapserver#4871.
Cool, thanks!
It doesn't fix your issue but i've released a version 0.1.5 (available on npm) that improves the error handling in the above situation to mimic the output created by core mapserver (e.g. the shp2img program).
The referenced issue was closed, so I'm closing this. Thanks!
There seems to be an issue with the cleanup of resources when there is an error reading an INCLUDEd file.
Here is an example mapfile illustrating the issue:
The
INCLUDE './DATASOURCE.map'
file defines some PostGIS connections.When calling
mapserv.Map.FromFile
on this file, the file stays open.