Gunicorn module path misconfiguration causes all routes to 404
criticalconfigurationUpdated Mar 19, 2026(via Exa)
How to detect:
Gunicorn started with wrong module:variable syntax fails to load Flask app. All routes return 404 because Flask defaults to 404 when app object not found. Works locally but fails after deployment.
Recommended action:
Use correct Gunicorn syntax: 'gunicorn myapp.app:app' for direct app object, or 'gunicorn "myapp:create_app()"' for application factory. Verify variable name matches (app vs application).