Fix HRRR fetch timeouts: 60s receive_timeout, reduce queue to 5

Req default 15s receive_timeout too short for GRIB2 byte-range
downloads on prod. Also reduce HRRR queue concurrency from 20 to 5
to avoid NOAA rate limiting (was causing burst-then-stall pattern).
This commit is contained in:
Graham McIntire 2026-03-31 15:37:21 -05:00
parent ff3a879dff
commit ffae4b52e7
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59
2 changed files with 2 additions and 2 deletions

View file

@ -44,7 +44,7 @@ config :microwaveprop, MicrowavepropWeb.Endpoint,
config :microwaveprop, Oban,
repo: Microwaveprop.Repo,
queues: [solar: 1, weather: 20, enqueue: 1, hrrr: 20, terrain: 4, commercial: 2, iemre: 10, propagation: 1],
queues: [solar: 1, weather: 20, enqueue: 1, hrrr: 5, terrain: 4, commercial: 2, iemre: 10, propagation: 1],
plugins: [
{Oban.Plugins.Pruner, max_age: 3600 * 24},
{Oban.Plugins.Lifeline, rescue_after: to_timeout(minute: 30)},

View file

@ -342,7 +342,7 @@ defmodule Microwaveprop.Weather.HrrrClient do
end
defp req_options do
defaults = [retry: &retry?/2, max_retries: 5, retry_delay: &retry_delay/1]
defaults = [receive_timeout: 60_000, retry: &retry?/2, max_retries: 5, retry_delay: &retry_delay/1]
overrides = Application.get_env(:microwaveprop, :hrrr_req_options, [])
Keyword.merge(defaults, overrides)
end