Support Center

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

502 Bad Gateway, 504 Gateway Time-out

Mitch Mar 13, 2018 03:43PM GMT

I have a cron job that uses your api. It makes a call every two second to keep the requests under 60 per minute. The problem is that i keep getting errors like 502 and 504. I log the links that produced the errors but every time i try the link manually in the browser it works. What could be the issue?

Example logs:

GET https://api.openweathermap.org/data/2.5/weather?lat=43.8486&lon=18.3564&lang=en&APPID=47f30b0313ae4381b7d21e7a6c6c26f0&cnt=` resulted in a `502 Bad Gateway` response:\n<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>502 Bad Gateway</h1>

GET https://api.openweathermap.org/data/2.5/weather?lat=43.8486&lon=18.3564&lang=en&APPID=47f30b0313ae4381b7d21e7a6c6c26f0&cnt=` resulted in a `504 Gateway Time-out` response:\n<html>\r\n<head><title>504 Gateway Time-out</title>

Regards, Mitch

Up 0 rated Down
Pavel Zuykov Mar 14, 2018 11:53AM GMT OpenWeatherMap Agent

Hello Mitch,

Please keep the frequency of this cron job for each minute. Sometimes it happnes because high load.

Thanks.

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
9eda11838f597e7a95b6a1c991dcae0a@openweathermap.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete