502 Bad Gateway when making api call

I’m getting a 502 (Bad gateway) error code sometimes when making an api call. When I put the address in my own browser, I do not get this issue. Any ideas?

Alas, I don’t think that people will be able to help much without a bit of context. What API call is it you’re making and to what server? What’s the context (e.g. does the problem only happen after 1001 successful calls, or only at a certain time of day, or only with a certain object)?


Here is an example that has failed:

The problem seems to have just started last night and into today. I’ve used this program now for the last week without any issues prior to this.

I’m using a console application in c# to call the endpoint. When I just paste the uri into a web browser it seems to work.

The “bleeding obvious” question, I’m afraid, is do you think you might be infringing the usage policy?

I’ve no idea whether that would cause a 502 error (I don’t know enough about the “plumbing” of Nominatim to answer). If you’re 100% confident that you’re abiding by the usage policy, and no-one who actually knows answers here, then I’d ask on #osm-dev on IRC.

1 Like

Pretty sure i’m following the usage policy. I use a timer between each request. Also, i’ve noticed that if the server returns 502, and then if i try it again, it works. I’ve tried clearing DNS cache, restarted my computer. Nothing seems to work to resolve the initial issue.