1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-12-30 02:01:32 +00:00

Add 10-minute startup grace period for clamd to fix memory limiting issue

Co-authored-by: DerLinkman <62480600+DerLinkman@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-11 12:35:21 +00:00
parent 376ba57f35
commit d73223cd93

View File

@@ -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