Opened 16 years ago
Last modified 15 years ago
#2815 new defect
CLOSE_CONNECTION=mapdraw
Reported by: | hobu | Owned by: | hobu |
---|---|---|---|
Priority: | normal | Milestone: | FUTURE |
Component: | MapServer C Library | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | warmerdam |
Description
It would be a nice feature to tell the connection pool to only keep connections alive for single mapdraws instead of forever. The utility of this would be somewhat limited, but it could be useful in some situations.
Change History (3)
comment:1 by , 16 years ago
comment:2 by , 15 years ago
Some notes re: discussions at Toronto Sprint
- Make the PROCESSING CLOSE_CONNECTION be actual mapfile directive
- Do "the right thing" (equivalent of CLOSE_CONNECTION=DEFER in the CGI case) by default
- Pooling rasters will work in a similar way to vectors
- Tile index layers will be handled specially (no pooling for layers *within* a tile index -- raster or vector)
comment:3 by , 15 years ago
On a roughly related note, I have modified the raster layer code to implement a sort of deferred connection handling (via GDALOpenShared()) that inspects the CLOSE_CONNECTION processing key. It will defer closing by default (the planned new global behavior), but does not automatically defer closes for tile indexes to avoid handle/resource exhaustion. (r8772)
I foresee this being done as a CLOSE_CONNECTION=MAPDRAW or something similar. We would essentially defer closing connections, but at the end of map->Draw() we would make a pass through the connection pool closing all connections with that status.
I do have some concerns about the impact in a true multi-threading environment (like c#).
I'd be willing to implement such a feature, given some help to test it.
I'd also suggest that MAPDRAW be the default and that ONCLOSE be the other option which means drop the connection when the layer is closed (as is done now).