#retry Clear
Tags #php #kotlin #bash #go #sql #rust #typescript #html #java #python #files #utils #strings #http #concurrency #async #json #arrays #security #types #crypto #database #dates #format
Python requests Session with Retry + Timeouts
A pre-configured requests.Session that auto-retries 5xx + connect errors with exponential backoff, applies a default timeout, and uses connection pooling. Use this everywhere instead of bare requests.get().
Python Async Retry with Exponential Backoff
Retry an async operation up to N times, doubling the wait each attempt with random jitter to avoid thundering herd. Predicate controls retryability so 4xx errors stop immediately.
PHP HTTP Retry with Exponential Backoff
Wrap any HTTP call in a retry loop with capped exponential backoff and jitter. Retries on 5xx / network errors but not on 4xx (those won't fix themselves).
JavaScript Fetch with Retry
Wraps the native fetch API with automatic retry logic using exponential backoff. Retries on network errors or non-OK HTTP responses up to a configurable number of attempts. Exponential backoff with optional jitter prevents thundering herd problems when many clients retry simultaneously.
TypeScript Retry with Exponential Backoff + Jitter
Retry an async operation up to N times, doubling the delay each attempt with random jitter to avoid thundering herd. Decide retryability via an optional predicate so 4xx errors stop immediately.
Bash cURL GET with Timeout + Retry
A sensible default cURL invocation: short connect timeout, total timeout, retry on transient failures with backoff, fail-on-error.
JavaScript Retry Promise with Backoff
Retries a Promise-returning function up to a specified number of times with configurable exponential backoff and optional jitter. Accepts a shouldRetry predicate so you can skip retries on specific error types (e.g. 401 Unauthorized). Returns the resolved value or re-throws the last error after exhausting retries.
Python Retry Decorator with Exponential Backoff
Generic retry decorator: attempts × base delay, exponential ramp, random jitter. Filter retryable exceptions via the `on` tuple so logical errors aren't retried.
PHP Try / Retry With Logging
Run a callable up to N times; log each failed attempt and bubble the last exception. Compact, no dependencies, useful for transient failures (S3 puts, email sends, etc.).