d devhelper

← All errors

External / infra

Faraday::TimeoutError

Net::ReadTimeout with #<TCPSocket:(closed)>

tokens#create1 events · 1 users first seen 193 d agolast seen 15 h ago

In one line

A login request timed out while waiting for the data warehouse's /oauth/token endpoint to respond; this happened once and the code has no timeout or rescue for it.

Checked against the code

What happened

  • tokens#create builds the login response in CustomTokenResponse#body, which calls fetch_dw_token when DATA_WAREHOUSE_SYNC is 'true'.
  • fetch_dw_token uses a bare Faraday.post with no explicit timeout and no rescue, so a slow data warehouse raises Faraday::TimeoutError (Net::ReadTimeout).
  • There is only 1 event and 1 user in 192 days on a path that runs on every login. That points to a one-off slowdown on the data warehouse side.
  • The code on releases/master is unchanged, so a future slow response would fail the login the same way.

What to do next

  1. Check Check the data warehouse service's logs and latency around 2026-11-10 21:05 UTC for slow /oauth/token requests.
  2. Code fix In app/lib/custom_token_response.rb fetch_dw_token, make the Faraday call fail safe. Set open_timeout 3 and timeout 5 on the request. Rescue Faraday::Error, log it, and return an empty dw_credentials hash, so a data warehouse outage does not block member login.

Queries are shown, never run. Check them before using them on production.

Ask a follow-up

Continues the same session, so it still remembers the error and the code it read.

Enter to send · Shift+Enter for a new line
Analysed 1 h ago · claude-sonnet-5-5 · $0.04