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.
Deployment Blocked: "Workstation Memory in Use"
When clicking "Deploy" or "Start Server", a notification appears stating that your workspace is currently busy and deployment is blocked.
You are on the Pro tier, which uses an Elastic Compute Pool. When you deploy an app, RAM is dynamically deducted from your IDE Workstation to power the server. If your IDE is currently running a heavy script and hoarding RAM, the system blocks the deployment. If it didn't, the Linux kernel would instantly execute an Out-Of-Memory (OOM) kill on your scripts.
Click the red "Stop" button in the IDE to kill any active data scripts, or type exit() in the REPL. Wait a few seconds for the memory to flush, then deploy your app again.
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 project has reached the hard physical storage limit of your tier (100MB for Free, 1GB for Pro). 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. Free users can upgrade to Pro to receive a 10x storage increase.
My script stops suddenly after 60 seconds
The Output log shows [System]: Script execution timed out and the process terminates before your loop completes.
You are on the Free or Guest tier, which enforces a strict 60-second execution wall to ensure fair resource distribution across the cluster.
Optimize your script to run faster, process data in smaller batches, or upgrade to a Pro Workstation to unlock 24/7 unlimited execution time.
Architectural Boundaries (Known Limits)
To ensure platform-wide stability and security, Python Online operates within specific, unchangeable 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 to install system-level C libraries. All Python dependencies must be installed via pip into your project's isolated user-space (the .pypackages folder).
2. Single Active Workstation (Pro)
While Pro users have unlimited project storage, you can only have one Active IDE session at a time. If you are coding in "Project A" and open "Project B", Project A's development container will be cleanly hibernated. (This does not affect your live web hosting, which runs on a separate track).
3. 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.
4. 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.