fix: remove manual gevent monkey-patch that blocked gunicorn worker boot

Gunicorn's gevent worker (-k gevent) handles monkey-patching internally.
The manual patch_all() in app.py ran in the master process before worker
fork, preventing the worker from booting (no 'Booting worker' log line,
server unreachable).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-02-28 17:24:22 +00:00
parent 9e3fcb8edd
commit b4b6fdc0fc
2 changed files with 0 additions and 11 deletions

9
app.py
View File

@@ -6,15 +6,6 @@ Flask application and shared state.
from __future__ import annotations
import os as _os
if _os.environ.get('INTERCEPT_USE_GEVENT') == '1':
try:
from gevent import monkey as _monkey
_monkey.patch_all(subprocess=False)
except ImportError:
pass
del _os
import sys
import site

View File

@@ -123,8 +123,6 @@ if [[ "$HAS_GUNICORN" -eq 1 && "$HAS_GEVENT" -eq 1 ]]; then
echo "[INTERCEPT] Starting production server (gunicorn + gevent)..."
echo "[INTERCEPT] Listening on ${HOST}:${PORT}"
export INTERCEPT_USE_GEVENT=1
GUNICORN_ARGS=(
-k gevent
-w 1