You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

ARDAgent memory leak

I have a 2014 Mac Mini running OSX Server on 10.13.6 High Sierra which used to become totally unresponsive and crash every now and then.

Found out that ARDAgent was using an enormous amount (and increasing over time) of memory.

Created a cronjob which kills the ARDAgent process every 3 hours and so far no issues anymore.


Open a Terminal window

Type cronjob -e

A VI editor window will now open.

Paste the following to kill the ARDAgent process every 3 hours:


# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of week (0 - 6) (Sunday to Saturday;
# │ │ │ │ │                    7 is also Sunday on some systems)
# │ │ │ │ │
# │ │ │ │ │
# * * * * * command_to_execute

# kill ARDAgent (has a serious memory leak) at minute 30 past every 3rd hour
30 */3 * * * pkill -15 "ARDAgent"


Save the cronjob file by pressing the escape key, then :wq


Sources:

https://osxdaily.com/2017/01/12/kill-process-by-name-command-line/

https://www.youtube.com/watch?v=QZJ1drMQz1A

https://github.com/CoreyMSchafer/code_snippets/blob/master/Cron-Tasks/snippets.txt

https://crontab.guru/#30_*/3_*_*_*

Mac mini, OS X 10.11

Posted on Jun 23, 2023 5:08 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 9, 2023 12:18 AM

Thanks so much for your post, which finally helped me solving a long time issue with my server.

However, the cronjob command did not work for me.

So I have used "crontab" instead.


The following worked out for me and runs smoothly:


sudo -s

crontab -e

Paste: (Kills the ARDAgent every 20 minutes)


Then press:

Esc-key followed by :wq


Check with:

crontab -l


The youtube link in the original post was pretty helpful, explaining all sorts of combinations regarding scheduling the cron-process. (https://www.youtube.com/watch?v=QZJ1drMQz1A)


(OSX Server 5.5 on 10.13.6 High Sierra)

Similar questions

1 reply
Question marked as Top-ranking reply

Dec 9, 2023 12:18 AM in response to 747-8driver

Thanks so much for your post, which finally helped me solving a long time issue with my server.

However, the cronjob command did not work for me.

So I have used "crontab" instead.


The following worked out for me and runs smoothly:


sudo -s

crontab -e

Paste: (Kills the ARDAgent every 20 minutes)


Then press:

Esc-key followed by :wq


Check with:

crontab -l


The youtube link in the original post was pretty helpful, explaining all sorts of combinations regarding scheduling the cron-process. (https://www.youtube.com/watch?v=QZJ1drMQz1A)


(OSX Server 5.5 on 10.13.6 High Sierra)

ARDAgent memory leak

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.