For maps with large aspect ratio, contextily downloads tiles as if the map was as small as the smallest dimension. It should base the zoom level on the dimension that's a larger extent.
This script has run fine for months, but in today's dataset the blue line coincidentally was almost perfectly horizontal. Therefore, the latitude extent of the map was very small, and because contextily uses the max of the two zoom levels, it attempted to download over a million zoomlevel 19 tiles from OSM.
For maps with large aspect ratio, contextily downloads tiles as if the map was as small as the smallest dimension. It should base the zoom level on the dimension that's a larger extent.
I discovered this bug when my server died attempting to render the following blue line on a map: https://sondemaps.lectrobox.com/seattle/2023/4/13-17-47.64048--123.95468.jpg
This script has run fine for months, but in today's dataset the blue line coincidentally was almost perfectly horizontal. Therefore, the latitude extent of the map was very small, and because contextily uses the max of the two zoom levels, it attempted to download over a million zoomlevel 19 tiles from OSM.