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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user