Monitoring and debugging
Viewing logs
When running Flash functions, logs are displayed in your terminal:LOG_LEVEL environment variable:
DEBUG, INFO, WARNING, ERROR.
Runpod console
View detailed metrics and logs in the Runpod console:- Navigate to the Serverless section.
- Click on your endpoint to view:
- Active workers and queue depth.
- Request history and job status.
- Worker logs and execution details.
View worker logs
Access detailed logs for specific workers:- Go to the Serverless console.
- Select your endpoint.
- Click on a worker to view its logs.
Add logging to functions
Include print statements in your endpoint functions for debugging:Configuration errors
API key not set
Error:- Generate an API key from Settings > API Keys in the Runpod console. The key needs All access permissions.
-
Set the key using one of these methods:
Option 1: Environment variable
Option 2: .env file in your project rootOption 3: Shell profile (~/.bashrc or ~/.zshrc)
Invalid route configuration
Error:Invalid HTTP method
Error:GET, POST, PUT, DELETE, or PATCH.
Invalid path format
Error:/:
Duplicate routes
Error:Deployment errors
Tarball too large
Error:- Check for large files that shouldn’t be included (datasets, model weights, logs).
- Add large files to
.flashignoreto exclude them from the build. - Use network volumes to store large models instead of bundling them.
Invalid tarball format
Error:.flash directory and rebuild:
Resource provisioning failed
Error:-
Check GPU availability: The requested GPU types may not be available. Add fallback options:
- Check account limits: You may have hit worker capacity limits. Contact Runpod support to increase limits.
-
Check network volume: If using
volume=, verify the volume exists and is in a compatible datacenter.
Runtime errors
Endpoint not deployed
Error:- For standalone scripts: Ensure the endpoint has time to provision. Flash handles this automatically, but network issues can cause delays.
-
For Flash apps: Deploy the app first with
flash deploy, then call the endpoint. - Check endpoint status: View your endpoints in the Serverless console.
Execution timeout
Error:-
Increase timeout: Set
execution_timeout_msin your configuration: - Optimize function: Profile your function to identify bottlenecks.
-
Use queue-based endpoints: For long-running tasks, use the
@Endpointdecorator pattern. Queue-based endpoints are designed for longer operations.
Connection failed
Error:- Check internet connection: Verify you have network access.
- Retry: Transient network issues often resolve on retry. Flash includes automatic retry logic.
- Check endpoint status: Verify the endpoint is running in the Serverless console.
HTTP errors from endpoint
Error:- Check logs: View worker logs in the Serverless console for detailed error messages.
-
Test locally: Use
flash runto test your function locally before deploying. -
Add error handling: Wrap your function logic in try/except to provide better error messages:
Serialization errors
Error:- Use simple types: Return dictionaries, lists, strings, numbers, and other JSON-serializable types.
-
Avoid complex objects: Don’t return PyTorch tensors, NumPy arrays, or custom classes directly. Convert them first:
- Check argument types: Input arguments must also be serializable.
Circuit breaker open
Error:- Wait and retry: The circuit breaker will automatically attempt recovery after the timeout (typically 60 seconds).
- Check endpoint health: Multiple failures usually indicate an underlying issue. Check logs and endpoint status.
- Fix the root cause: Address whatever is causing the repeated failures before retrying.
GPU availability issues
Job stuck in queue
Symptom: Job status showsIN_QUEUE for extended periods.
Cause: The requested GPU types are not available.
Solutions:
-
Add fallback GPUs: Expand your
gpulist with additional options: -
Use GpuGroup.ANY: For development, accept any available GPU:
- Check availability: View GPU availability in the Serverless console.
- Contact support: For guaranteed capacity, contact Runpod support.
Dependency errors
Module not found
Error (in worker logs):@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:- Discord: Join the Runpod Discord for community support.
- GitHub Issues: Report bugs or request features on the Flash repository.
- Support: Contact Runpod support for account-specific issues.