From ffae4b52e70fa6042a1edc6c43c6f950c22b313b Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Tue, 31 Mar 2026 15:37:21 -0500 Subject: [PATCH] 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). --- config/config.exs | 2 +- lib/microwaveprop/weather/hrrr_client.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.exs b/config/config.exs index ff72b5ff..f09ea41c 100644 --- a/config/config.exs +++ b/config/config.exs @@ -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)}, diff --git a/lib/microwaveprop/weather/hrrr_client.ex b/lib/microwaveprop/weather/hrrr_client.ex index 0dc12bb5..98ffc229 100644 --- a/lib/microwaveprop/weather/hrrr_client.ex +++ b/lib/microwaveprop/weather/hrrr_client.ex @@ -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