nsurlsessiond - taking up all bandwidth
Asked Answered
Q

8

31

enter image description here

I am trying to find a solution to prevent nsurlsessiond using up all my bandwidth. It is using 2GB of data daily. I have also tried the links below. Because of this issue I am not able to complete my company work. Please can anyone help?

  1. https://forums.macrumors.com/threads/nsurlsessiond-heavy-network-usage.2027130/
  2. https://forums.macrumors.com/threads/nsurlsessiond-process-going-crazy-on-catalina.2228994/
  3. https://forums.macrumors.com/threads/nsurlsessiond-downloading-data.1785204/
  4. https://discussions.apple.com/thread/6605949

I am getting this while on click nsurlsessiond.

enter image description here

Queer answered 26/7, 2020 at 9:16 Comment(4)
Does it stop using bandwidth if you shut down the simulator?Survivor
@PhillipMills, no it's not stopingQueer
Check this url: swiftdevcenter.com/…Brackett
If mac user - disable automatic downloads of Podcasts in the Apple Podcasts app. You're welcome. ;-)Monney
S
32

I fix it by disabling Software Updates.

Go to System Preferences -> Software Update

Click on Advanced... and uncheck "Check for Updates"

enter image description here

Edit

I had this issue again recently but only when i opened the iOS simulator. I don't know what's the problem but the simulator will use internet for about 500MB and back to normal. Either you can wait until simulator stops downloading or just block the url using firewall as @Lutze explained

Sermonize answered 30/1, 2021 at 1:57 Comment(4)
YOU ARE MY HERO :)Lotion
I spent several days and tried different approaches. But only this answer helped. Thanks you!Promptbook
Thanks for helping. I was visiting a new country where data rates are 20x more expensive. My mac was simply drinking all the data like a smoothie and my head was like 🤯Planarian
thanks a lot! mac calm down after I turn it offGurney
G
4

The main problem is that any application can delegate transfers to the NSURLSession Daemon. As a workaround you could use an application firewall like Little snitch to detect and block the specific domain where the traffic comes from.

In my case it was "osxapps.itunes.apple.com" that took a lot of bandwidth.

Screenshot of little snitch with the blocked domain

Goodbye answered 11/11, 2020 at 9:37 Comment(0)
L
2

Best Solution:

You can create a script that runs whenever nsurlsessiond is created and stops it automatically, you can use launchd, a built-in system service on macOS that manages processes and runs scripts at specific intervals or in response to specific events.

Here are the steps to create a launchd script that monitors nsurlsessiond and stops it automatically:

1- Open the Terminal application on your MacBook.

2- Create a new launchd configuration file by running the following command:

nano ~/Library/LaunchAgents/com.example.nsurlsessiond-monitor.plist

This will open the nano text editor and create a new file named com.example.nsurlsessiond-monitor.plist in the LaunchAgents directory.

3- Paste the following XML code into the nano text editor:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>Label</key>
    <string>com.example.nsurlsessiond-monitor</string>
    <key>ProgramArguments</key>
    <array>
      <string>/bin/bash</string>
      <string>-c</string>
      <string>while true; do
          if pgrep nsurlsessiond > /dev/null; then
            killall nsurlsessiond
          fi
          sleep 5
        done</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <dict>
      <key>SuccessfulExit</key>
      <false/>
    </dict>
  </dict>
</plist>

This code defines a launchd configuration file that runs a bash script that checks if nsurlsessiond is running every 5 seconds and stops it if it is. The KeepAlive key ensures that the script is always running, and the SuccessfulExit key ensures that the script is restarted if it exits with an error.

4- Save the file and exit nano by pressing Control+O, then Enter, and then Control+X.

5- Load the launchd configuration file by running the following command:

launchctl load ~/Library/LaunchAgents/com.example.nsurlsessiond-monitor.plist

This will register the launchd job and start running the script.

Now, whenever nsurlsessiond is created, the script will automatically stop it. If you want to stop the script manually, you can unload the launchd configuration file by running the following command:

launchctl unload ~/Library/LaunchAgents/com.example.nsurlsessiond-monitor.plist
Lustring answered 12/3, 2023 at 19:32 Comment(0)
M
1

I had the same issue, then I fixed using this way:

System Settings > Apple ID > iCloud > iCloud Drive > Turn Off

Important: After this process, your data may not be synchronized with iCloud.

iCloud Settings

Myongmyopia answered 26/6, 2023 at 7:50 Comment(0)
D
0
launchctl unload /System/Library/LaunchAgents/com.apple.nsurlsessiond.plist
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlsessiond.plist
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlstoraged.plist

This works for me.

Doley answered 13/2, 2021 at 5:6 Comment(1)
While this code may provide a solution to the question, it's better to add context as to why/how it works. This can help future users learn and eventually apply that knowledge to their own code. You are also likely to have positive-feedback/upvotes from users, when the code is explained.Artair
F
0

Had this issue for a couple of days - i installed 11.3.1 which had been pending for a while and the issue seems to have sorted itself out.

Felicio answered 11/5, 2021 at 8:51 Comment(0)
P
0

if Nsurlsessiond Causes High CPU and Bandwidth Usage , do this :

1 - Go to Activity Monitor, and locate the trustd process.

2 - Copy its PID from the PID column.

3 - Launch Terminal and run the # sudo kill -9 [trustd PID] command to end the parent trustd process.

Note: Replace [trustd PID] with the PID you just copied.

4 - Run the # ls -la /var/folders/zz | grep nsurlsessiond command to find the specific “randomized name” directory. You’re going to need this information for the next command.

5 - Then, run the # sudo rm -fr /var/folders/zz/[randomized name] command to remove the nsurlsessiond temporary directory.

Note: Replace [randomized name] with the name you previously found.

source


6 - follow this solution

Premonish answered 9/10, 2021 at 19:13 Comment(0)
I
-2

i used cloudfare Warp App and it stopped the nsurlsessiond from downloading .

ITS WORKING for me on MacBookPro using Big sur OS :)

Igal answered 14/2, 2021 at 12:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.