From d73223cd934033e1cbba1dc9f5c784602cb00c6d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 11 Dec 2025 12:35:21 +0000 Subject: [PATCH] Add 10-minute startup grace period for clamd to fix memory limiting issue Co-authored-by: DerLinkman <62480600+DerLinkman@users.noreply.github.com> --- data/Dockerfiles/clamd/clamd.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/data/Dockerfiles/clamd/clamd.sh b/data/Dockerfiles/clamd/clamd.sh index c656be065..6b5c90969 100755 --- a/data/Dockerfiles/clamd/clamd.sh +++ b/data/Dockerfiles/clamd/clamd.sh @@ -93,7 +93,14 @@ BACKGROUND_TASKS+=($!) echo "$(clamd -V) is starting... please wait a moment." nice -n10 clamd & -BACKGROUND_TASKS+=($!) +CLAMD_PID=$! +BACKGROUND_TASKS+=($CLAMD_PID) + +# Give clamd time to start up, especially with limited resources +# This grace period allows clamd to initialize fully before health checks begin +STARTUP_GRACE_PERIOD=600 # 10 minutes in seconds +echo "Waiting ${STARTUP_GRACE_PERIOD} seconds for clamd to start up..." +sleep ${STARTUP_GRACE_PERIOD} while true; do for bg_task in ${BACKGROUND_TASKS[*]}; do