heremaps/harp.gl

harp.gl should support rate limiting and not just return blank tiles

Closed this issue · 21 comments

When looking at the horizon & or moving the camera quite fast I get 100s of errors like that below. Parts of the map stop loading and there are chunks left empty. This never used to be a problem in earlier versions (0.21.1) for example.

image

Steps to reproduce:

  1. Download & extract zip
  2. Run 'yarn'
  3. Enter your API key on Line 29 in 'pages/index.tsx'
  4. Run 'yarn run dev'
  5. Look at the horizon & move the camera around

I'd expect the tiles to load slower but not at the rate where your API is refusing requests.

image

  • OS: Window 10
  • Browser Chrome
  • Version 91.0.4472.106

Example: harp-bug.zip

@harrycollin , thanks for the bug ticket.

I guess you are on the freemium account? Do you have many users using this particular key? I notice you put it in the screenshot, it means that other people can use and also potentially misuse.

Have you looked in your account to see if there are any further details.

Unfortunately, if you get a 429, there isn't much we can do on our side, as the service is causing the issue.

Hope that helps,

@nzjony thanks for the reply. This is a new API key that I made specifically just for this project. I don't this this is misuse, but I'll check anyway

@harrycollin , ok, weird. Try to create a new API key and let me know if that makes any difference?

There could be some problem locally, but I somewhat doubt it.

Do you have a globe projection with custom far plane? Potentially you are downloading too many tiles and the server returns the 429, but I somewhat doubt it.

@nzjony I made a new API key and still have the same problem. I don't have any exotic setup, just flat projection & MapControls controlling the camera. I could try making a new account to & generate a new API key that way but I don't see why it would make a difference.

Did you manage to test the project I attached?

@harrycollin , thanks for trying a new API key. Ok, weird.

Can you check in your developer network tab and see what value is given for: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After ?

I will try to test the product you have attached and get back to you.

@nzjony It's 10
image

@harrycollin , I didn't get 429, but it does download many tiles.

See:
https://user-images.githubusercontent.com/2533428/122927829-8b7a3180-d369-11eb-9038-60371b8a24ce.mp4

Can you try reseting your router to get a new IP address?

@harrycollin , can you try looking in your account to see if you have run out of the free amount of requests?

@harrycollin , I didn't get 429, but it does download many tiles.

See:
https://user-images.githubusercontent.com/2533428/122927829-8b7a3180-d369-11eb-9038-60371b8a24ce.mp4

Can you try reseting your router to get a new IP address?

My public IP address won't get changed unfortunately.

Btw, you can also check an online demo here: https://cassini-hackathon-parametricos.vercel.app/
I participated in a hackathon over the weekend with my company. This is what we put together.

@harrycollin , can you try looking in your account to see if you have run out of the free amount of requests?
We're well within our limits:
image

@harrycollin , I get a 429 on that link.

Something weird is going on...

Ahhh now it works....

Yep something weird indeed.

@harrycollin , I wrote to you on slack.

The rate limit from Fermium accounts is 100 requests within 10 seconds, as it says in the headers you posted. This should be enough for panning. @nzjony for tilted maps this could be a problem since many tiles are requested at the same time.

@pakore , thank you!!

Ok, that explains it @harrycollin.

You can then:

@harrycollin , because the rate limiting issue is clear, I have changed the title to reflect the fact that harp.gl doesn't work with rate limiting.

However we are quite full at the moment working on internal tickets, so it may take some time to work on this, but I hope we can prioritise it, because it will also affect our paying customers.

That's fine. At least we found the source of of the issue. Thank you for investigating :)

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.