The 49-Day Ticking Time Bomb in macOS TCP Networking You Need to Fix

TCP connections fail after 49 days due to 32-bit counter overflow in XNU kernel, affecting Mac servers and CI systems

C. da Costa Avatar
C. da Costa Avatar

By

Image: Deposit Photos

Key Takeaways

Key Takeaways

  • macOS TCP connections fail after exactly 49 days due to kernel counter overflow
  • TIME_WAIT garbage collection stops working, accumulating thousands of dead connections silently
  • Enterprise Mac servers require scheduled reboots before 49.7-day uptime threshold

Photon discovered this networking nightmare while running their iMessage monitoring service. Their Mac fleet started mysteriously refusing new TCP connections after exactly 49 days, 17 hours, 2 minutes, and 47.296 seconds of continuous uptime. Existing connections worked fine. Ping worked perfectly. New outbound connections? Dead in the water.

The culprit lives deep in macOS’s XNU kernel: a 32-bit counter called tcp_now that tracks milliseconds since boot. When this counter overflows after 2^32 milliseconds, Apple’s code freezes like a deer in headlights. The TIME_WAIT garbage collection system—responsible for cleaning up closed connections—stops working entirely.

Silent Failure, Loud Consequences

No kernel panic, no clear logs—just accumulating network chaos.

Photon’s live reproduction tells the whole story. Before overflow, their systems maintained a healthy ~200 TIME_WAIT connections during normal load. After the magical 49.7-day mark, these connections started piling up like unopened mail:

  • 399
  • 412
  • Eventually reaching 8,217 after just 9.5 hours

SYN_SENT connections climbed past 3,000. System load spiked to 49.74.

This explains those mysterious Apple Community forum posts about TCP failures after weeks of uptime, and why Podman users reported networking stalls on macOS 12 VMs. The symptoms were always there—someone just needed to connect the dots to that precise timestamp.

Your Reboot Schedule Just Got More Important

Consumer Macs dodge this bullet, but your server infrastructure needs attention.

Your MacBook Pro probably updates and reboots frequently enough to never see this bug. But that Mac Pro running CI/CD builds in your data center? That Mac mini cluster handling automated workflows? They’re sitting ducks.

The only current fix is rebooting before hitting 49.7 days—hardly elegant for enterprise deployments. Photon is developing a non-reboot workaround, but Apple hasn’t responded yet to what amounts to a fundamental violation of RFC 7323’s timestamp handling expectations.

Check your uptime with uptime and schedule those maintenance windows accordingly. In the world of always-on infrastructure, even Apple’s rock-solid Unix foundation has an expiration date—and it’s precisely 49 days, 17 hours, 2 minutes, and 47.296 seconds away.

Share this

At Gadget Review, our guides, reviews, and news are driven by thorough human expertise and use our Trust Rating system and the True Score. AI assists in refining our editorial process, ensuring that every article is engaging, clear and succinct. See how we write our content here →