Skip to content

Commit

Permalink
Log active tasks and mem usage (#7611)
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacsolo authored Feb 15, 2024
1 parent b47ef80 commit 75925a9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/discovery-provider/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ else
# start other workers with remaining CPUs
audius_service=worker celery -A src.worker.celery worker --max-memory-per-child 300000 --loglevel "$audius_discprov_loglevel" --concurrency=$(($(nproc) - 5)) 2>&1 | tee >(logger -t worker) &

while [[ "$audius_discprov_env" == "stage" ]]; do
# log active tasks and mem to find mem leaks
sleep 60
active_tasks=$(celery -A src.worker.celery inspect active --timeout 60)
mem_usage=$(top -b -n 1)
echo "$active_tasks"
echo "$mem_usage"
done &

fi
fi

Expand Down

0 comments on commit 75925a9

Please sign in to comment.