mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 13:46:02 +08:00
add gunicorn keepalive setting (#19537)
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: Bowen Liang <liang.bowen.123@qq.com>
This commit is contained in:
parent
16a4f77fb4
commit
88cd9aedb7
@ -35,6 +35,7 @@ else
|
|||||||
--worker-class ${SERVER_WORKER_CLASS:-gevent} \
|
--worker-class ${SERVER_WORKER_CLASS:-gevent} \
|
||||||
--worker-connections ${SERVER_WORKER_CONNECTIONS:-10} \
|
--worker-connections ${SERVER_WORKER_CONNECTIONS:-10} \
|
||||||
--timeout ${GUNICORN_TIMEOUT:-200} \
|
--timeout ${GUNICORN_TIMEOUT:-200} \
|
||||||
|
--keep-alive ${GUNICORN_KEEP_ALIVE:-2} \
|
||||||
app:app
|
app:app
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -142,6 +142,9 @@ CELERY_WORKER_CLASS=
|
|||||||
# it is recommended to set it to 360 to support a longer sse connection time.
|
# it is recommended to set it to 360 to support a longer sse connection time.
|
||||||
GUNICORN_TIMEOUT=360
|
GUNICORN_TIMEOUT=360
|
||||||
|
|
||||||
|
# The number of seconds to wait for requests on a Keep-Alive connection, default to 2
|
||||||
|
GUNICORN_KEEP_ALIVE=2
|
||||||
|
|
||||||
# The number of Celery workers. The default is 1, and can be set as needed.
|
# The number of Celery workers. The default is 1, and can be set as needed.
|
||||||
CELERY_WORKER_AMOUNT=
|
CELERY_WORKER_AMOUNT=
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ x-shared-env: &shared-api-worker-env
|
|||||||
SERVER_WORKER_CONNECTIONS: ${SERVER_WORKER_CONNECTIONS:-10}
|
SERVER_WORKER_CONNECTIONS: ${SERVER_WORKER_CONNECTIONS:-10}
|
||||||
CELERY_WORKER_CLASS: ${CELERY_WORKER_CLASS:-}
|
CELERY_WORKER_CLASS: ${CELERY_WORKER_CLASS:-}
|
||||||
GUNICORN_TIMEOUT: ${GUNICORN_TIMEOUT:-360}
|
GUNICORN_TIMEOUT: ${GUNICORN_TIMEOUT:-360}
|
||||||
|
GUNICORN_KEEP_ALIVE: ${GUNICORN_KEEP_ALIVE:-2}
|
||||||
CELERY_WORKER_AMOUNT: ${CELERY_WORKER_AMOUNT:-}
|
CELERY_WORKER_AMOUNT: ${CELERY_WORKER_AMOUNT:-}
|
||||||
CELERY_AUTO_SCALE: ${CELERY_AUTO_SCALE:-false}
|
CELERY_AUTO_SCALE: ${CELERY_AUTO_SCALE:-false}
|
||||||
CELERY_MAX_WORKERS: ${CELERY_MAX_WORKERS:-}
|
CELERY_MAX_WORKERS: ${CELERY_MAX_WORKERS:-}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user