Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix(api): raise gunicorn keep-alive above client idle reuse window (#44839)
S1Moncd7ed2c16073
diff --git a/api/docker/entrypoint.sh b/api/docker/entrypoint.shindex 84efe23f963..44902ac5182 100755--- a/api/docker/entrypoint.sh+++ b/api/docker/entrypoint.sh@@ -164,6 +164,7 @@ else--worker-class ${SERVER_WORKER_CLASS:-geventwebsocket.gunicorn.workers.GeventWebSocketWorker} \--worker-connections ${SERVER_WORKER_CONNECTIONS:-10} \--timeout ${GUNICORN_TIMEOUT:-200} \+ --keep-alive ${GUNICORN_KEEP_ALIVE:-10} \app:socketio_appfifidiff --git a/docker/.env.example b/docker/.env.exampleindex 6e7f48d616b..7607eb30ff7 100644--- a/docker/.env.example+++ b/docker/.env.example@@ -61,6 +61,10 @@ API_WEBSOCKET_WORKER_CLASS=geventwebsocket.gunicorn.workers.GeventWebSocketWorkeAPI_WEBSOCKET_WORKER_CONNECTIONS=1000API_WEBSOCKET_GUNICORN_TIMEOUT=360GUNICORN_TIMEOUT=360+# Must stay above the idle connection reuse window of the HTTP clients that+# pool connections to the API (Node's undici reuses a socket for 4s). 0+# disables keep-alive.+GUNICORN_KEEP_ALIVE=10CELERY_WORKER_CLASS=CELERY_WORKER_AMOUNT=4CELERY_AUTO_SCALE=falsediff --git a/docker/envs/core-services/shared.env.example b/docker/envs/core-services/shared.env.exampleindex 44417e74b97..0f736eb56b7 100644--- a/docker/envs/core-services/shared.env.example+++ b/docker/envs/core-services/shared.env.example@@ -328,6 +328,12 @@ TENCENT_VECTOR_DB_DATABASE=difyBAIDU_VECTOR_DB_DATABASE=difyEXPOSE_PLUGIN_DAEMON_PORT=5002GUNICORN_TIMEOUT=360+# Must stay above the idle connection reuse window of the HTTP clients that+# pool connections to this server. Node's global fetch (undici) keeps a socket+# idle for 4s before dropping it, so a shorter value here lets the server close+# a connection the client still considers reusable, which surfaces as+# intermittent ECONNRESET on server-side rendering. 0 disables keep-alive.+GUNICORN_KEEP_ALIVE=10CELERY_WORKER_AMOUNT=CELERY_AUTO_SCALE=falseCELERY_MAX_WORKERS=