Skip to content

Commit

Permalink
[INLONG-10889][Agent] When the oom is detected, the process exits
Browse files Browse the repository at this point in the history
  • Loading branch information
justinwwhuang committed Aug 28, 2024
1 parent 6d8a567 commit d8fcf53
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions inlong-agent/bin/oom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function stop_agent() {
(( count++ ))
time=$(date "+%Y-%m-%d %H:%M:%S")
pid=$(ps -aux | grep 'java' | grep 'inlong-agent' | grep "$check_agent_uniq" | awk '{print $2}')
echo "$time oom stopping agent($pid) $count times" >> $CONSOLE_OUTPUT_FILE
if [ "${count}" -gt 10 ]; then
echo "$time oom kill -9 $pid" >> $CONSOLE_OUTPUT_FILE
kill -9 "${pid}"
Expand Down

0 comments on commit d8fcf53

Please sign in to comment.