Fix Flask Issues

Troubleshooting guides for common Flask, Nginx, and Gunicorn production errors.

This section is for production failures that appear after deployment. Most issues fall into one of a few categories: upstream connectivity, socket permissions, static file paths, or media serving configuration.

Start with the symptom you can observe most clearly. A 502 usually points to upstream failure, connection refused points to a missing listener, and broken CSS or uploads usually point to Nginx path or permission mistakes.

Fast Triage Rule

Check Nginx error logs first, then Gunicorn status, then the file or socket path involved. That order usually reveals whether the fault is configuration, permissions, or application startup.