Merge pull request #2716 from danswer-ai/hotfix/v0.7-background-logs

backport: rely on stdout redirection for supervisord logging (#2711)
This commit is contained in:
rkuo-danswer 2024-10-07 15:48:43 -07:00 committed by GitHub
commit 2be133d784
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,25 +30,25 @@ command=celery -A danswer.background.celery.celery_run:celery_app worker
--concurrency=4
--prefetch-multiplier=1
--loglevel=INFO
--logfile=/var/log/celery_worker_primary_supervisor.log
--hostname=primary@%%n
-Q celery
environment=LOG_FILE_NAME=celery_worker_primary
stdout_logfile=/var/log/celery_worker_primary.log
stdout_logfile_maxbytes=16MB
redirect_stderr=true
autorestart=true
startsecs=10
stopasgroup=true
[program:celery_worker_light]
command=celery -A danswer.background.celery.celery_run:celery_app worker
--pool=threads
--concurrency=16
--prefetch-multiplier=8
--loglevel=INFO
--logfile=/var/log/celery_worker_light_supervisor.log
--hostname=light@%%n
-Q vespa_metadata_sync,connector_deletion
environment=LOG_FILE_NAME=celery_worker_light
command=bash -c "celery -A danswer.background.celery.celery_run:celery_app worker \
--pool=threads \
--concurrency=${CELERY_WORKER_LIGHT_CONCURRENCY:-24} \
--prefetch-multiplier=${CELERY_WORKER_LIGHT_PREFETCH_MULTIPLIER:-8} \
--loglevel=INFO \
--hostname=light@%%n \
-Q vespa_metadata_sync,connector_deletion"
stdout_logfile=/var/log/celery_worker_light.log
stdout_logfile_maxbytes=16MB
redirect_stderr=true
autorestart=true
startsecs=10
@ -60,10 +60,10 @@ command=celery -A danswer.background.celery.celery_run:celery_app worker
--concurrency=4
--prefetch-multiplier=1
--loglevel=INFO
--logfile=/var/log/celery_worker_heavy_supervisor.log
--hostname=heavy@%%n
-Q connector_pruning
environment=LOG_FILE_NAME=celery_worker_heavy
stdout_logfile=/var/log/celery_worker_heavy.log
stdout_logfile_maxbytes=16MB
redirect_stderr=true
autorestart=true
startsecs=10
@ -71,9 +71,9 @@ stopasgroup=true
# Job scheduler for periodic tasks
[program:celery_beat]
command=celery -A danswer.background.celery.celery_run:celery_app beat
--logfile=/var/log/celery_beat_supervisor.log
environment=LOG_FILE_NAME=celery_beat
command=celery -A danswer.background.celery.celery_run:celery_app beat
stdout_logfile=/var/log/celery_beat.log
stdout_logfile_maxbytes=16MB
redirect_stderr=true
startsecs=10
stopasgroup=true
@ -94,17 +94,12 @@ startsecs=60
# No log rotation here, since it's stdout it's handled by the Docker container logging
[program:log-redirect-handler]
command=tail -qF
/var/log/celery_beat.log
/var/log/celery_worker_primary.log
/var/log/celery_worker_light.log
/var/log/celery_worker_heavy.log
/var/log/document_indexing_info.log
/var/log/celery_beat_supervisor.log
/var/log/celery_worker_primary_supervisor.log
/var/log/celery_worker_light_supervisor.log
/var/log/celery_worker_heavy_supervisor.log
/var/log/celery_beat_debug.log
/var/log/celery_worker_primary_debug.log
/var/log/celery_worker_light_debug.log
/var/log/celery_worker_heavy_debug.log
/var/log/slack_bot_debug.log
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
autorestart=true
stdout_logfile_maxbytes = 0 # must be set to 0 when stdout_logfile=/dev/stdout
autorestart=true