Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Periodic "Internal error: 500001"

Lasse Skindstad Ebert Dec 02, 2017 10:25PM GMT

I use OpenWeatherMap to fetch current weather information once per hour for multiple locations (by geolocation).

My query looks something like this:
GET /data/2.5/weather?lat=xx.xxxxx&lon=xx.xxxxx&units=metric&appid=xxxxxxxxxxx

I call this from two different apps with different API keys under the same OpenWeatherMap account (staging and production servers) at the same time every hour.

I make around 25 requests in a short time (around 3 seconds) every hour. Most of the time it fails on the 20th request, in which case I wait five minutes and retry that request and also executes the last 5 requests, which usually go though without fail.

I'm getting this response when it fails:

status 500, body: {"cod":"500","message":"Internal error: 500001"}

I have a free plan, and I do not exceed the 60 requests per minute limit.
I do exceed 1 request per second. Is that how rate limiting is measured? I have not received any notifications about having exceeded the limit.

Why do I get a 500 back?


Up 0 rated Down
Lasse Skindstad Ebert Dec 02, 2017 10:31PM GMT
As a bonus info: I now see there is a "Block log" in my account.
It has only been activated once in May this year. I get the 500 error almost once per hour.

Also: It is not the same location it fails for every time.
Up 0 rated Down Dec 12, 2017 09:33AM GMT OpenWeatherMap Agent

Hello Lasse,

Sorry for the delay in our reply.

Thanks very much for your reporting. We will investigate it.

Could you please specify are you still getting an error?

Up 0 rated Down
Lasse Skindstad Ebert Dec 12, 2017 11:54AM GMT
Yes, the problem still exists.

As mentioned, I fetch weather data once per hour. I get the error message around once per two hours.
Up 1 rated Down Dec 12, 2017 01:22PM GMT OpenWeatherMap Agent

If the request is made exactly at 00 minutes of each hour, then this may be due to the peak load. At this time, it usually increases 4-6 times.

To solve the problem, just shift the query time for a minute before or after: 59 or: 01.

This can solve the problem and does not affect the quality of the data.

Up 0 rated Down
Lasse Skindstad Ebert Dec 13, 2017 08:59AM GMT
Thanks, that makes sense. Yes, I am requesting on the 00 minute.

I will change the request time and report back here if it worked out.
Up 0 rated Down
Lasse Skindstad Ebert Dec 14, 2017 07:53AM GMT
Fix I deployed yesterday seems to be working.
Now, instead of fetching weather data every hour on the 00 minute, I fetch 58-62 minutes after the last fetch.
I only had one error since yesterday, and that was for a request that randomly fell on the 00 minute (and 11 seconds).
Will fix to never request near the 00 minute ;)
Up 0 rated Down Dec 15, 2017 09:10AM GMT OpenWeatherMap Agent

Hello Lasse,

Thank you so much for the follow-up.

We really appreciate your feedback.

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found