Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Cannot delete files opened by mapnik (on windows) #1121

Closed
yhahn opened this Issue · 7 comments

2 participants

@yhahn
Owner

Projects that have had their datasources (e.g. shapefile) accessed by mapnik cannot be deleted cleanly as mapnik keeps a file handle open to the file.

Not sure what the best approach to this one will be.

@springmeyer
Owner

We could work around the specific case of shapefiles by not caching them/memory mapping them at all (this is a compile time configuration which is often turned off for windows but is currently turned on in our builds).

But my larger sense is that we need to expose a global method in mapnik to flush the shapefile memory file_mapping cache. We may also need to consider exposing the other caches as well, like image symbols, fonts, and the postgres pool, so that TileMill can tell mapnik to stop managing resources for projects no longer in use and avoid memory growth that is not directly beneficial to the project(s) actively being used.

We don't have a mapnik issue for this specifically yet, but these are somewhat related:

mapnik/mapnik#784
#714

@yhahn
Owner

If we want a bazooka-style workaround project deletion could stop the tile server, nuke the project, and then start the tile server...

@springmeyer
Owner

@yhahn - re-loading the tileserver does not sound optimal but I would be fascinated to know if that works here. Good to have all the options on the table :).

@yhahn
Owner

It does indeed work.

@yhahn
Owner

Just to update the ticket, we may fix this upstream in mapnik by disabling memmapping on windows.

@springmeyer
Owner

new build of mapnik without memory mapping performs the same (z0-6 render of default project) and fixes this issue (mostly - see #1180). closing.

@springmeyer
Owner

no longer hitting with this node v0.8.9 - so disabled in bb785ab

@springmeyer springmeyer referenced this issue from a commit
@springmeyer springmeyer reinstate bazooka yet again so win XP can delete projects (or any oth…
…er case where millstone falls back to hardlink or copy approach) - refs #1121, #1180 and mapbox/millstone#71
8e06bca
@springmeyer springmeyer referenced this issue in mapnik/mapnik
Closed

api to clear/flush global cache #1022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.