High severity intermediate · Fix: 5-15 min

ConnectionError

requests.exceptions.ConnectionError

What this error means
RunPod fails to connect to network storage due to unreachable mount points or misconfigured credentials.

Stack trace

traceback
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='storage.runpod.io', port=443): Max retries exceeded with url: /mount (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f8c1a2b3d30>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
QUICK FIX
Verify network connectivity and DNS resolution to RunPod storage, then add retry logic around storage mount calls.

Why it happens

RunPod's network storage connection error occurs when the client cannot reach the storage endpoint due to DNS resolution failures, network outages, or incorrect storage mount configurations. This prevents the application from accessing required persistent storage volumes.

Detection

Monitor connection attempts to RunPod storage endpoints and catch requests.exceptions.ConnectionError exceptions to log unreachable storage or DNS failures before the app crashes.

Causes & fixes

1

DNS resolution failure for RunPod storage endpoint

✓ Fix

Verify network DNS settings and ensure the host 'storage.runpod.io' resolves correctly from your environment.

2

Network firewall or security group blocking outbound HTTPS to RunPod storage

✓ Fix

Allow outbound HTTPS (port 443) traffic to RunPod storage IP ranges in your firewall or cloud security groups.

3

Incorrect or missing storage mount credentials or configuration

✓ Fix

Check and update your RunPod storage mount configuration and credentials to ensure proper authentication and access.

4

Temporary network outage or intermittent connectivity issues

✓ Fix

Implement retry logic with exponential backoff around storage connection attempts to handle transient network failures.

Code: broken vs fixed

Broken - triggers the error
python
import requests

response = requests.get('https://storage.runpod.io/mount')  # This line triggers ConnectionError
print(response.content)
Fixed - works correctly
python
import os
import requests
import time

# Added retry logic and environment-based config
storage_url = 'https://storage.runpod.io/mount'
max_retries = 3
for attempt in range(max_retries):
    try:
        response = requests.get(storage_url)
        response.raise_for_status()
        print(response.content)
        break
    except requests.exceptions.ConnectionError as e:
        print(f'Connection failed on attempt {attempt + 1}: {e}')
        if attempt < max_retries - 1:
            time.sleep(2 ** attempt)  # exponential backoff
        else:
            raise  # re-raise after max retries
Added retry logic with exponential backoff to handle transient network failures and prevent immediate crash on connection errors.

Workaround

Wrap storage connection calls in try/except ConnectionError, log the failure, and fallback to local cache or degraded mode until connectivity is restored.

Prevention

Use robust network monitoring and alerting for storage endpoint availability, configure retries with backoff, and validate storage credentials and DNS settings during deployment.

Python 3.7+ · requests >=2.0.0 · tested on 2.31.0
Verified 2026-04
Verify ↗

Community Notes

No notes yetBe the first to share a version-specific fix or tip.