macOS 49.7-day bug: Macs may lose network connectivity if run continuously for too long.
A research team has discovered a critical bug in macOS that can cause Macs to stop establishing new network connections if they operate continuously for about 49.7 days. The problem stems from an overflow in the internal TCP timer, causing the network system to stall even though the machine is functioning normally.
Hidden bug causes Mac to suddenly lose connection.
Using Macs as servers running 24/7 isn't common, but many organizations do implement this approach. While monitoring the iMessage service, the research team at Photon discovered a puzzling phenomenon: some Macs were suddenly unable to establish new network connections, even though the system was otherwise functioning normally.
Oddly, these machines were still responding to ping commands and maintaining existing connections, complicating the diagnostic process. The engineering team was forced to restart the system to restore network functionality – a temporary solution that system administrators typically avoid.
After further monitoring, they realized that all the malfunctioning machines had a continuous operating time of approximately 49.7 days.
The problem stems from the internal TCP counter.
Upon further investigation, the Photon team identified the cause as a network timer called tcp_now in the operating system kernel. This timer tracks the uptime of the TCP/IP stack since the system started, measured in milliseconds.
tcp_now is stored as a 32-bit unsigned integer, with a maximum value of 4,294,967,295. Once this limit is reached, the counter resets to 0, equivalent to approximately 49.7 days of continuous operation.
Under normal circumstances, macOS automatically cleans up closed TCP connections after about 30 seconds. However, when tcp_now reaches its limit and a processing error occurs in the operating system kernel, the system cannot determine the expiration time of old connections, causing the cleanup process to fail.
As a result, network ports are temporarily occupied and the TCP stack gradually fills up, preventing the Mac from establishing new connections.
Similar to other well-known overflow errors in history.
This issue is actually a type of integer overflow error, which has appeared in many systems before. A famous example is the 49.7-day error in Windows 98 or the year 2038 problem related to 32-bit timers.
In the case of macOS, the error only appears when the system is running continuously for extended periods with high network traffic, so it's rarely encountered by typical users. However, in server or surveillance environments, this can be a significant risk.
The temporary solution is to restart the system.
According to Photon, the current solution is to restart the machine before reaching the 49.7-day mark to avoid the issue. The research team also stated that this bug has been reported in several discussions within the Apple user community and is likely to be fixed by Apple in upcoming macOS updates.
In the long run, fixing how the tcp_now counter is handled in the operating system kernel will be the definitive solution. If patched in time, macOS could become more stable in environments requiring continuous 24/7 operation, such as servers or service monitoring systems.
Update 08 April 2026
Samuel Daniel
Samuel Daniel is a senior technology analyst, a high-level expert responsible for evaluating complex technical systems and providing strategic recommendations to improve organizational efficiency and productivity.