Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Allow configuring open/read timeouts for API requests

Offen
#1,466 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

@fluke arbeitet bereits daran.

Seit 04.10.2026.

  • #1467 von @fluke — offen

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
ruby
Bereich
api, backend

Rechercherichtung

Start with ShopifyAPI::Context.setup and ShopifyAPI::Clients::HttpClient#request, then inspect the existing retry behavior. Add the two optional timeout settings and verify they are passed to HTTParty on every request while unset settings preserve current behavior and timeout exceptions are not retried.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

devtools-gardener

Overview

ShopifyAPI::Clients::HttpClient#request calls HTTParty without a timeout, so every Admin API request uses Net::HTTP's default 60-second read timeout. When Shopify is slow to send the first byte, the calling thread waits for as long as that takes. On a web server, that thread is a request worker.

In production we saw a stalled Admin GraphQL read hold a Puma thread for 27.5s, while our p99.9 for the same calls is about 2s. The client has no supported way to set a shorter limit. The only workaround is to monkey-patch HTTParty.

Proposal

Add optional open_timeout and read_timeout (seconds) to ShopifyAPI::Context.setup, and pass them to HTTParty on every request:

ShopifyAPI::Context.setup(
  # other params...
  open_timeout: 5,
  read_timeout: 10,
)

When they aren't set, behaviour stays exactly as it is today. A timeout raises Net::OpenTimeout or Net::ReadTimeout out of the client; the existing retry loop only retries 429/500 responses, so a timeout isn't retried.

Related

  • #1456 asks for arbitrary HTTParty options to be passed through.
  • #1376 implements a general httparty_params hash (timeouts, proxy, debug output). It has been open since April 2025.

This proposal is deliberately narrower: just the two timeouts, as typed Context settings. That keeps the change small and easy to review, and doesn't commit the gem to exposing all of HTTParty's options. If maintainers prefer the general approach in #1376, that covers this too.

Vorherrschende Sprache
Ruby
Sterne
1.1k
Forks
487
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
3

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Shopify/shopify-api-ruby

Alle Issues in Shopify/shopify-api-ruby

Ähnliche Issues

Weitere Issues zu Ruby

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.