Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement retries in fetch_tile #25

Open
swartjean opened this issue Feb 17, 2021 · 1 comment
Open

Implement retries in fetch_tile #25

swartjean opened this issue Feb 17, 2021 · 1 comment

Comments

@swartjean
Copy link

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.

@wrobell
Copy link
Owner

wrobell commented Feb 18, 2021

I wonder if this could be handled somehow with aiohttp library. I need to do a bit of research.

Would you know what could be exact reason for the disconnection?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants