Skip to content

Implement retries in fetch_tile #25

@swartjean

Description

@swartjean

I have noticed an issue while using MapProxy as a local tile cache where the connection can be occasionally be dropped before the full request/response interaction has been completed.

This results in a series of errors like the ones below, and a set of error tiles being rendered onto the map.

Unable to download http://localhost:8080/tiles/layer/grid/11/1129/1228.png (error: Server disconnected)
Unable to download http://localhost:8080/tiles/layer/grid/11/1128/1227.png (error: Server disconnected)

Actually navigating to these tile endpoints works just fine, which shows that the tiles are generally being served correctly.

A quick hack shows that wrapping the body of fetch_tile in a simple retry loop is all that is needed to mitigate this and make the downloader a bit more robust.

I may take a look at implementing this myself if time allows, but I thought that I would bring it to your attention just in case it is something that you have already thought about.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions