mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-07-09 14:33:28 +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."
|
echo "$(clamd -V) is starting... please wait a moment."
|
||||||
nice -n10 clamd &
|
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
|
while true; do
|
||||||
for bg_task in ${BACKGROUND_TASKS[*]}; do
|
for bg_task in ${BACKGROUND_TASKS[*]}; do
|
||||||
|
|||||||
Reference in New Issue
Block a user