Closed vincentsarago closed 6 years ago
There are some weird things happening !
I've been noticing random black tiles when playing with the demo at viewer.remotepixel.ca. Those tiles seemed to appear when doing a lot of panning.
Then I noticed something really strange 👇
This is what append when you call the same tile twice in a row (using hot
lambda container). So basically, when calling for a tile ta first it will work but then some caching mechanism will return black tiles for all latest calls.
something is happening here: https://github.com/mapbox/landsat-tiler/blob/65072ecae93aab153fd820dc0ca4d605777a409c/app/landsat.py#L91-L100
rescaling
part (L94-98) the black tile do not happen. tiles
endpoint (not for the processing
one).👇 this is a log for the 2 consecutive request where I'm logging the min and max of the tile
variable
01:23:43 START RequestId: 420ad5b2-daed-11e7-82a7-2f2cc7d38d3b Version: $LATEST
01:23:44 [landsat-tiler] - [DEBUG] - 380 - 1263 #before rescaling
01:23:44 [landsat-tiler] - [DEBUG] - 22 - 157 #after rescaling
01:23:44 END RequestId: 420ad5b2-daed-11e7-82a7-2f2cc7d38d3b
01:23:46 START RequestId: 4577e8af-daed-11e7-9995-190fb543c25f Version: $LATEST
01:23:46 [landsat-tiler] - [DEBUG] - 22 - 157 #before rescaling
01:23:46 [landsat-tiler] - [DEBUG] - 1 - 1 #after rescaling
01:23:46 END RequestId: 4577e8af-daed-11e7-9995-190fb543c25f
Basically the variable tile
is cached and get reused and rescaled again 🎉
see https://github.com/mapbox/rio-tiler/pull/6