#resilience 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
PHP Auto-Reconnect on "MySQL has gone away"
Long-running daemons sometimes lose their MySQL connection mid-run. Wrap your DB calls to retry once after a transient connection-lost error.
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).
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.).