Open Editor →

Troubleshooting & Limits

Understand the architectural boundaries of Python Online and find immediate solutions to common deployment and execution errors.

Common Errors and Solutions

If you encounter an unexpected issue while running or deploying code, consult this guide for the most frequent platform-specific behaviors.

Web App shows "502 Bad Gateway"

You deployed your application, the status says "Live", but clicking your public URL displays a blank 502 error page.

The platform router is trying to send traffic to your container, but nobody is answering the door. This almost always means the port you typed in the Hosting Dashboard (e.g., 8000) does not match the port your Python script is actually listening on (e.g., Flask defaulting to 5000).

Check the Start Commands matrix to find the correct default port for your framework. Update the "Internal Port" field in the Hosting Dashboard, save, and restart your server.

Error 507: Insufficient Storage

A notification appears stating "Disk Quota Exceeded" when trying to save a file, or a package installation immediately rolls back and fails.

Your account has reached its physical storage limit (512MB). Installed packages, CSV files, and SQLite databases all count toward this limit.

Open the Packages panel and uninstall heavy libraries you are no longer using, or delete large data assets from the Explorer to free up space.

My script stops suddenly after 60 seconds

The Output log shows Execution session timed out after 60 seconds. and the process terminates before your loop completes.

Python Online enforces a 60-second execution wall to ensure fair resource distribution across the compute cluster.

Optimize your script to run faster or process data in smaller batches.

Architectural Boundaries (Known Limits)

To ensure platform-wide stability and security, Python Online operates within specific boundaries.

1. The Immutable Root Filesystem

The containers running your code are locked down. The root OS is read-only. You cannot use commands like sudo or apt-get install. All Python dependencies must be installed via pip into your project's isolated user-space (the .pypackages folder).

2. Process & PID Limits

To prevent malicious fork-bomb attacks from taking down a compute node, all containers are strictly capped at 64 concurrent processes. Attempting to spawn hundreds of threads in Python will result in a Resource temporarily unavailable OS error.

3. Headless Automation Constraints

Scheduled Tasks run without a visual interface. Any code that pauses execution to wait for user interaction (e.g., input("Press Enter")) will be bypassed. Attempting to open native GUI windows will result in a fatal script crash.

Pro-Tips for Power Users

Use Relative Paths
Always write your scripts using relative paths (e.g., open('data/metrics.json')) instead of hardcoding absolute paths. This ensures your code is completely portable and will work perfectly when you export your project as a ZIP to run on your local machine.

Safe Experimentation
Because the platform utilizes an immutable OS root and strict user-space isolation, you cannot permanently "break" your environment. Feel free to experiment with deep terminal commands or complex scripts—your project is a secure, recoverable sandbox.