Synology Drive spawning too many connections
Published on Nov 17, 2025
In the past few months I had a lot of weird issues with my new (and with a clean install of macOS) computer. I especially noticed that while running brew update. It would just have issues connecting to the internet and immediately re-running the command usually fixed the issue right away. This was also noticeable in other tasks like updating Ruby gems. It was annoying, but not annoying enough to drop everything and start investigating.
It usually looked like this:
==> Updating Homebrew...
fatal: unable to access 'https://github.com/Homebrew/brew/': Failed to connect to github.com port 443 after 1 ms: Couldn't connect to server
fatal: unable to access 'https://github.com/shopify/homebrew-shopify/': Failed to connect to github.com port 443 after 1 ms: Couldn't connect to server
fatal: unable to access 'https://github.com/stripe/homebrew-stripe-cli/': Failed to connect to github.com port 443 after 1 ms: Couldn't connect to server
Error: Fetching /opt/homebrew failed!
Fetching /opt/homebrew/Library/Taps/shopify/homebrew-shopify failed!
Fetching /opt/homebrew/Library/Taps/stripe/homebrew-stripe-cli failed!
Problems like these are very hard to debug as it could be anything from something being wrong in your Wifi Access Point, a faulty Ethernet cable, buggy IPv6 or so some obscure DNS issue at your ISP (Usually it's just your local PiHole, but not in this case).
After not being able to fix it over months I gave Warp.app that task to debug. It's basically Terminal.app with built-in AI, so it can debug this much quicker and run all kinds of debug commands that I would otherwise have to piece together for hours.
It found two issues over a few sessions:
- Stale network interfaces from Tailscale (I guess some buggy old version that didn't clean up after itself), but sadly cleaning that up didn't fix the issue.
- Synology Drive was hogging all my open ports and that was the reason why new connections could not be established unless some of the stale connections expire. That's why it usually started working after a few seconds.
From then on I always had a Terminal window running the following command open.
watch -n 5 'netstat -an | grep TIME_WAIT | wc -l'
Sure enough it always hovered around 15k when Synology Drive was running. Quitting it immediately made that number drop down to < 5 connection attempts with the TIME_WAIT status. With these new search terms I was also able to track down a thread on the Synology forum that mentions this issue, sadly with no responses. Even with the right search terms I was not able to track down other uses with that issue.
The directory I'm syncing has 30k image files, which doesn't seem like an unusual amount. If anyone else runs into that and finds this through a search engine, let me know how you fixed it!