Skip to main content
This guide covers how to monitor your Flash deployments, debug issues, and resolve common errors.

Monitoring and debugging

Viewing logs

When running Flash functions, logs are displayed in your terminal:
Control log verbosity with the LOG_LEVEL environment variable:
Available levels: DEBUG, INFO, WARNING, ERROR.

Runpod console

View detailed metrics and logs in the Runpod console:
  1. Navigate to the Serverless section.
  2. Click on your endpoint to view:
    • Active workers and queue depth.
    • Request history and job status.
    • Worker logs and execution details.
The console provides metrics including request rate, queue depth, latency, worker count, and error rate.

View worker logs

Access detailed logs for specific workers:
  1. Go to the Serverless console.
  2. Select your endpoint.
  3. Click on a worker to view its logs.
Logs include dependency installation output, function execution output (print statements, errors), and system-level messages.

Add logging to functions

Include print statements in your endpoint functions for debugging:

Configuration errors

API key not set

Error:
Cause: Flash requires a valid Runpod API key to provision and manage endpoints. Solution:
  1. Generate an API key from Settings > API Keys in the Runpod console. The key needs All access permissions.
  2. Authenticate using one of these methods: Option 1: Use flash login (recommended)
    Opens your browser for authentication and saves your credentials. Option 2: Environment variable
    Option 3: .env file for local CLI use
    Values in your .env file are only available locally for CLI commands. They are not passed to deployed endpoints.
    Option 4: Shell profile for persistent local access

Corrupted credentials file

Error:
Cause: The credentials file at ~/.runpod/config.toml contains invalid TOML and cannot be read. This can also appear as “No API key found” even after a successful flash login. Solution: Delete the credentials file and re-authenticate:

Invalid route configuration

Error:
Cause: Load-balanced endpoints require HTTP method decorators for each route. Solution: Ensure all routes use the correct decorator pattern:

Invalid HTTP method

Error:
Cause: The HTTP method specified is not supported. Solution: Use one of the supported HTTP methods: GET, POST, PUT, DELETE, or PATCH.

Invalid path format

Error:
Cause: HTTP paths must begin with a forward slash. Solution: Ensure paths start with /:

Duplicate routes

Error:
Cause: Two functions define the same HTTP method and path combination. Solution: Ensure each route is unique within an endpoint. Either change the path or method of one function.

Build errors

Unsupported Python version

Error:
Cause: Flash supports Python 3.10, 3.11, 3.12, and 3.13. Your local Python version is outside this range. Solution: You have three options:
  1. Use the --python-version CLI flag to override local detection:
  2. Declare python_version on your resource configs:
  3. Switch to a supported Python version using a virtual environment:
Python 3.12 is recommended for best performance with no cold-start overhead. Python 3.10, 3.11, and 3.13 incur additional cold-start overhead on GPU workers because an alternative Python interpreter must be installed.

Deployment errors

Tarball too large

Error:
Cause: The deployment package exceeds the 1.5GB limit. Solution:
  1. Check for large files that shouldn’t be included (datasets, model weights, logs).
  2. Add large files to .gitignore to exclude them from the build.
  3. Use network volumes to store large models instead of bundling them.

Invalid tarball format

Error:
Cause: The build artifact is corrupted or not a valid gzip file. Solution: Delete the .flash directory and rebuild:

SSL certificate verification failed

Error:
Cause: Python cannot locate the system’s trusted CA certificates, preventing secure connections during deployment. This commonly occurs on fresh Python installations, especially on macOS. Solution: Try one of these fixes:
  1. Install certifi and set the certificate bundle path:
  2. macOS only: Run the certificate installer that comes with Python. Find it in your Python installation folder (typically /Applications/Python 3.x/) and run Install Certificates.command.
  3. Add to shell profile for persistence:
Transient SSL errors (like connection resets) are automatically retried during upload. The certificate verification error requires manual intervention because it indicates a system configuration issue.

Resource provisioning failed

Error:
Cause: Flash couldn’t create the Serverless endpoint on Runpod. Solutions:
  1. Check GPU availability: The requested GPU types may not be available. Add fallback options:
  2. Check account limits: You may have hit worker capacity limits. Contact Runpod support to increase limits.
  3. Check network volume: If using volume=, verify the volume exists and is in a compatible datacenter.

Runtime errors

Endpoint not deployed

Error:
Cause: The endpoint function was called before the endpoint finished provisioning. Solutions:
  1. For standalone scripts: Ensure the endpoint has time to provision. Flash handles this automatically, but network issues can cause delays.
  2. For Flash apps: Deploy the app first with flash deploy, then call the endpoint.
  3. Check endpoint status: View your endpoints in the Serverless console.

Execution timeout

Error:
Cause: The endpoint function took longer than the configured timeout. Solutions:
  1. Increase timeout: Set execution_timeout_ms in your configuration:
  2. Optimize function: Profile your function to identify bottlenecks.
  3. Use queue-based endpoints: For long-running tasks, use the @Endpoint decorator pattern. Queue-based endpoints are designed for longer operations.

Connection failed

Error:
Cause: Network connectivity issue between your local environment and the Runpod endpoint. Solutions:
  1. Check internet connection: Verify you have network access.
  2. Retry: Transient network issues often resolve on retry. Flash includes automatic retry logic.
  3. Check endpoint status: Verify the endpoint is running in the Serverless console.

HTTP errors from endpoint

Error:
Cause: The endpoint function raised an exception during execution. Solutions:
  1. Check logs: View worker logs in the Serverless console for detailed error messages.
  2. Test locally: Use flash dev to test your function locally before deploying.
  3. Add error handling: Wrap your function logic in try/except to provide better error messages:

Serialization errors

Error:
Cause: The function’s return value cannot be serialized/deserialized. Solutions:
  1. Use simple types: Return dictionaries, lists, strings, numbers, and other JSON-serializable types.
  2. Avoid complex objects: Don’t return PyTorch tensors, NumPy arrays, or custom classes directly. Convert them first:
  3. Check argument types: Input arguments must also be serializable.

Payload too large

Error:
Cause: The serialized argument exceeds the 10 MB limit. Flash uses base64 encoding, which expands data by approximately 33%, so roughly 7.5 MB of raw data becomes 10 MB when encoded. Solutions:
  1. Use network volumes for large data: Save large data to a network volume and pass the file path:
  2. Compress data before sending: For data that must be passed directly, use compression:
  3. Split large requests: Break large datasets into smaller chunks and process them in multiple requests.

Deserialization timeout

Error:
Cause: The deserialization process took longer than 30 seconds. This usually indicates malformed or corrupted serialized data that causes the unpickle operation to hang. Solution: Verify your input data is properly serialized. If you’re manually constructing payloads, ensure the data was serialized using cloudpickle and encoded with base64. The Flash SDK handles this automatically for programmatic calls.

Circuit breaker open

Error:
Cause: Too many consecutive failures to the endpoint triggered the circuit breaker protection. Solutions:
  1. Wait and retry: The circuit breaker will automatically attempt recovery after the timeout (typically 60 seconds).
  2. Check endpoint health: Multiple failures usually indicate an underlying issue. Check logs and endpoint status.
  3. Fix the root cause: Address whatever is causing the repeated failures before retrying.

GPU availability issues

Job stuck in queue

Symptom: Job status shows IN_QUEUE for extended periods. Cause: The requested GPU types are not available. Solutions:
  1. Add fallback GPUs: Expand your gpu list with additional options:
  2. Use GpuGroup.ANY: For development, accept any available GPU:
  3. Check availability: View GPU availability in the Serverless console.
  4. Contact support: For guaranteed capacity, contact Runpod support.

Dependency errors

Module not found

Error (in worker logs):
Cause: A required dependency was not specified in the @Endpoint decorator. Solution: Add all required packages to the dependencies parameter:

Version conflicts

Symptom: Function fails with import errors or unexpected behavior. Cause: Dependency version conflicts between packages. Solution: Pin specific versions:

Getting help

If you’re still stuck:
  1. Discord: Join the Runpod Discord for community support.
  2. GitHub Issues: Report bugs or request features on the Flash repository.
  3. Support: Contact Runpod support for account-specific issues.