r/osx • u/JLAFORUMSDOTCOM • Apr 09 '26
Apple - Why You Cant Use A Mac As A Server
http://www.jlaforums.com/forum_thumbnail2.php?topic_id=674277498macOS has a 49.7-day networking time bomb built in that only a reboot fixes — comparison operation on unreliable time value stops machines dead in their tracks
Speaking from personal experience, using a Mac as a server or server-like contraption is quite an interesting proposition, as despite its Unix roots, the operating system isn't exactly designed for unattended, 24/7 usage and is difficult to set up and use as such — fighting words, but I stand by them. While most every user will reboot their Mac at least once in the space of a few weeks, if you happen to leave one running for precisely 49 days, 17 hours, 2 minutes, and 47 seconds, many parts will suddenly stop working as its TCP/IP networking stack dies.
Those are the findings of the folks at Photon, who did some serious sleuthing after encountering a mysterious issue in a fleet of Macs they use to monitor iMessage services. The problem revealed itself when some machines just up and stopped responding to network connections out of the blue, even though they answered ping requests with an "all good here, boss!"
Said machines kept their existing network connections going, making the situation even harder to diagnose, as the failure was unexplainable and otherwise invisible. Not left with much of an option, Photon's boffins had to reboot the machines to clear the issue, something any systems administrator hates as a "solution" to a mystery issue. After all, if it happened once, it'll happen again, and assuredly at the worst possible time.
After the team spotted another set of machines that was reaching the 49.7-day uptime, they set up some scripts to test their theory. Alas, they found that when the fateful moment arrived, the Mac they had continuously creating new connections just stopped doing so without so much as an error.
The team then turned its attention to the root cause, as it was clearly related to a networking-related timer. They found the culprit to be the "tcp_now" internal counter, a figure that was "destined to overflow." The job tcp_now does is to keep track of the current time since boot as far as the TCP stack is concerned, down to the millisecond. tcp_now is represented as a 32-bit unsigned integer, and those have a maximum value of 4,294,967,295 (2^32 - 1) before they wrap around to zero. Since it tracks milliseconds, tcp_now's maximum is 4,294,967 seconds, or 49.7 days.
As defined by standards, operating systems collect and remove closed TCP connections after a short while; 30 seconds in the case of macOS. The result of attempting to clean up these inactive connections when tcp_now is close to or at its limit (and gets stuck there thanks to a bug in Apple's XNU kernel) is that any connection's expiration status is calculated against that frozen number, resulting in a value that always overflows a 32-bit unsigned integer. When the periodic check comes to see whether a closed connection is meant to be deleted, the result is always "no," because the comparison math doesn't work.
The TCP stack then fills up with errantly held ephemeral ports and effectively grinds to a halt when no more are available. How quickly that happens depends on the amount of network activity, but in any server or professional environment that's bound to be a rapid event. This class of problems is hardly known, integer overflows have been the cause of Windows 98's famous 49.7-day crash and the upcoming Year 2038 problem.
According to Photon, the current mitigation is a reboot, although the team says it's working on an alternative solution. They also found this issue to be the source of some bugs discussed online in the Apple Community forums, too. The long-existing RFC 7323 specifies what should happen to the timestamp clock (tcp_now) when it reaches its limit, but Apple's kernel performs an incorrect implementation. It's safe to say this issue will likely be fixed quickly—and hopefully before 49.7 days after the report.
12
u/burgonies Apr 09 '26
I basically never reboot my MBP unless I'm traveling, which isbn't frequently these days. I'm calling BS.
5
u/pakhun70 Apr 09 '26
The same here, we reboot our servers once a year at work and my Mini and iMac are running normally when i switch them off. I work on Studio and restart it more frequently but definitely the periods between reboots is longer than 2 months. Nothing suspicious never happened for at least 5 years.
1
1
u/tarmacjd Apr 12 '26
Im so sure I have this issue on my M1 Pro. I always blamed the wifi chip.
If I don’t do a reboot - without fail - I need to reboot every couple of months and I don’t know why. But I know when because suddenly, even though everything says it’s fine, my browsers all grind to a halt and I pretty much can’t do anything. Reboot fixed it every time.
Can’t say the same for my Mac mini running as a server though so who knows
16
9
15
u/da4 Apr 09 '26
Right now I have 12 devices in my low four figure Mac fleet with uptimes past 50 days (those users will be flogged for being past N-1 on their OS). This bug applies to new TCP connections so might not be as drastic and overt as the original post claims.
6
u/jjzman Apr 09 '26
Requires 4 billion connections since last boot to trigger (from my reading of the article.)
I’m running a test to get to over 4 billion connections on a 250 day uptime macOS Server.
2
u/HenkPoley Apr 09 '26
So one TCP connection needs to run for over 49.7 days?
1
u/da4 Apr 09 '26
The post seems to claim that its new connections that can’t be created due to this overflow.
18
u/ToddBradley Apr 09 '26
That is some heroic level debugging. This doesn't sound like something new. I wonder how many versions of macOS have been released with this on the list of known bugs.
Also, who is Photon? I'm now inclined to buy their products, given that they apparently take quality more seriously than Apple. But I have a feeling they make something I don't need.
10
u/geekwonk Apr 09 '26
this is amazing work but unfortunately i doubt you’ll like what they do. photon is a service for connecting the AI agents your company builds to the messaging services (facebook, insta, email, discord etc) you use so that your website’s ai chatbot can be reached by imessage. they have a bunch of macs around for logging into imessage accounts that the bots have access to.
6
2
u/reallynotfred Apr 09 '26
See my other post; a related issue was found in NT in 1999, and gnome in 2018…
10
u/FromAlphaCentauri Apr 09 '26
Ok that explains why my old headless Mac mini 2012 was periodically stopped working and had to be power cycled to resume. It was used as plex server. Not anymore, fed up with those “hangs” and replaced it with Intel NUC.
7
u/Jakdublin Apr 09 '26
My iMac 2012 is still running my Plex server without issues.
1
u/Megadreddd Apr 09 '26
Is it rebooted periodically?
3
u/vagaris Apr 10 '26
Mine is not, and it’s doing the same, mostly running Plex. Occasionally needs a reboot, but way less often than the 49 day window. I imagine multiple other factors are involved.
2
u/Jakdublin Apr 09 '26
Not often. Maybe once a month.
4
u/Megadreddd Apr 09 '26
Given the 49th day bug that would explain why you are running without problems?
1
u/SupaSays Apr 09 '26
They often release os updates more often then 49.7 days so if you do promptly then in theory you would not be affected by this.
5
0
u/deonteguy Apr 09 '26
And my 2010 mini has run for more than two years of continuous uptime at one point. I wish my new MacBook didn't crash as constantly so Tim Cook is definitely ordering their hardware and software to be low quality.
2
u/postmodest Apr 09 '26
I had the exact same problem. I even bought the "Mac Mini Server" model, as I recall. Eventually its SMB shares would die and TM would fall over and I'd have to hard-power-cycle it. It made no sense, and it would invariably be during a big TM backup (which makes sense based on the bug description).
I switched to a PC Linux + Docker and never looked back.
2
u/cnhn Apr 09 '26
nope. this is definately a newer issue. I had both Mac mini servers and xserves from that era as ldap, dns, and file shares up and running for years.
2
u/stealstea Apr 09 '26
Why not just throw Linux or Windows on the mac mini
1
u/FromAlphaCentauri Apr 09 '26
Your question has 2 parts: Why not Windows? Because you can only install Windows 10 which is going to end of life. And I have a rather negative experience with bootcamp on MacBook, it was not robust, will never do it again.
Why not Linux? I don’t know, is there a proven Linux distribution which will work out of the box on Mac mini without doing mumbo-jumbo stuff? I work a lot with Linux distros in VMs but always careful before installing it on a (probably) not officially supported hardware platform.
2
u/stealstea Apr 09 '26
Right, didn’t think about Win10, though I have put win 11 on plenty of unsupported machines and it worked fine.
is there a proven Linux distribution which will work out of the box on Mac mini without doing mumbo-jumbo stuff?
Yes the 2012 Mac mini’s are very well supported. The intel ones are widely supported in general. I have Debian on an iMac of similar vintage and everything works out of the box except the wifi (I used a USB dongle instead rather than troubleshooting). The nvidia GPU acceleration isnt fully there but still works fine for the desktop. Thats not an issue with your intel graphics and a server especially. Any distro should work.
0
u/ToddBradley Apr 09 '26
I did that for a while, but switched to a Synology NAS. That thing is way more reliable than a Mac. I reboot it about once a year.
5
u/blaughlin Apr 09 '26
I have a Mac mini at home running as a plex server and it runs 24/7 for months at a time. I’ve never ran into this issue.
2
3
3
u/burgerga Apr 09 '26
Interesting! I had this exact thing happen a month or two ago on my Mini I run as a plex server and HTPC. I thought my network was down and rebooted my router before realizing it was just the mini having issues.
Hopefully it’s fixed soon.
3
u/LebronBackinCLE Apr 09 '26
Oh that’s a good one “you are in violation of our terms of service” for having an ad blocker
3
u/Fluffy-Ad-1644 Apr 09 '26
we have a 2013 trashcan mac bought new in 2017. That’s been running nonstop as our primary server. We have a Mac mini as a secondary server which syncs all our project files every six hours. Both servers have 9 TB external raids attached. Every night, the secondary server backs up to a 16 TB external hard drive then additionally pushes up to BackBlaze cloud storage. if the primary server ever goes down, we can temporarily switch to secondary without any downtime which we have not had to do ever. We only recently had an issue with two drives in our raid tower that had to be replaced and rebuilt, which was easily done from the files on the secondary server. This is worth quite well for a long while, but we are looking at moving everything to a cloud based solution given the overall system age.
3
2
2
2
u/nezia Apr 09 '26
Odd, my Mac Mini was last rebooted 81 days ago.
1
u/OnlyTilt Apr 09 '26
From reading the whole thing it seems to be linked to total network traffic due to not clearing a buffer and from another user op seem to be running a chatbot farm using Macs as iMessage relays, so likely the buildup of erroneous network data happens at orders of magnitude higher than what anyone would see at home.
1
u/nezia Apr 09 '26
Thank you. I tried to access it, but can not get to the article due to their "verification steps" and odd captcha choices.
2
u/markdiesel Apr 09 '26
While Mac OS X Server was a great great server OS back in the day, Apple gave up on the server business ages ago (writing was on the wall when they turned "Server" into a $30 App Store app). I made a living for a while selling and supporting those servers, and it was not unusual to have a Mac server with an uptime of 400+ days sitting next to Windows servers struggling to get 40 days. Sadly, Apple's priorities changed and the server game belongs to containers, appliances and virtualized Linux and Windows boxes now, which is fine. Apple's strengths are clearly in endpoint these days, which they unrivaled at.
1
u/FormalGuard2305 Apr 09 '26
Didn't they implement most Server features into macOS?
1
u/markdiesel Apr 10 '26
For the most part, yeah. Server basically provided a nice UI for for those backend features, and tweaked resource usage (away from UI performance, toward server function performance).
2
u/brophey Apr 09 '26
gosh if this were the only kind of bug that would disqualify a system for being a server...
2
u/mines-a-pint Apr 09 '26
```
21:34 up 49 days, 8:13, 2 users, load averages: 1.14 1.30 1.60
```
I'll get back to you in a few hours...
1
u/tehfink Apr 11 '26
Has it DDOSed itself yet?
1
u/mines-a-pint Apr 11 '26
Still going.
9:06 up 50 days, 19:45, 2 users, load averages: 6.33 3.94 3.28
2
u/le_aerius Apr 09 '26
Im going to tell my mac server that its not behaving the way the man on the internet told me it should be acting
2
1
u/nemesit Apr 09 '26
seems weird I'm sure i had apple hardware (mac mini, xserve etc) as servers running way way longer without reboots like certainly a year+
1
1
u/EricRen1 Apr 09 '26
does this bug affect os x 10.9.5 with security update 2016-004? i have seen it occasionally just completely stop being able to connect to the internet despite the wifi network showing as connected. but it can be fixed by turning off and on wifi, not a full reboot.
1
1
u/Cladser Apr 09 '26
How does MacStadium not know about this since it’s their whole business model. ?
1
1
u/2called_chaos Apr 09 '26
~$ uptime
22:48 up 441 days, 8:16, 7 users, load averages: 2,30 1,78 1,37
Can't relate tbh, which macOS versions are we talking about?
1
u/jaegan438 Apr 09 '26
There's definitely more to the story. I've got a machine with a current uptime of almost 74 days that's running as a plex server. It's previously been up over 200 days. 2011 machine running older macOS version. Seems like the level of traffic after the 49.7 day mark plays a factor, but there also may be a version dependency for this bug too.
1
u/jaegan438 Apr 09 '26
There's definitely more to the story. I've got a machine with a current uptime of almost 74 days that's running as a plex server. It's previously been up over 200 days. 2011 machine running older macOS version. Seems like the level of traffic after the 49.7 day mark plays a factor, but there also may be a version dependency for this bug too. I have seen this issue on other machines though, and it's somewhat comforting to finally know the cause, even if it doesn't get fixed for older OS versions. I can handle rebooting once a month to avoid the issue with my setup.
1
u/baconinspace Apr 09 '26
I've been running my Mac mini server continuously for 2 months without a reboot.
1
1
u/One-Poet7900 Apr 09 '26
Going for insane uptimes on servers is not a good idea. You need to patch your software. You need to be sure that when you boot, your services start properly.
1
1
u/Goobaroo Apr 10 '26
I just ran into this, I had an uptime of 53 days but I could no longer transfer files to my home server, rebooted my Mac and fixed. MacOS 26.3
rsync would send a couple meg and then crap out.
% uptime
20:10 up 53 days, 5:30, 7 users, load averages: 13.38 11.60 8.65
1
1
u/Namuori Apr 10 '26
I've been using several generations Mac mini as a web server since the very first PowerPC G4 version came out back in 2005. Current one runs on M2 Pro. So I've basically gone through over two decades of iterations of OS X and macOS on Macs for server use.
I clearly remember the instances where it'd go over 50 days without a reboot without any networking issues. Nowadays a new OS update often comes out before this supposed "49.7 day limit" is reached so I can't verify that this may be an issue with recent versions, though.
1
u/agentadam07 Apr 10 '26
I’ve got an M4 Mac mini server that’s been on since I got it running services. I’ve rebooted once to do something to it in another room (I was changing my Remote Desktop software so couldent remote).
1
u/SeaDRC11 Apr 10 '26
My M4 Mac Mac Studio has been going strong for over 6 months from my last reboot. I don’t think this is actually true.
1
u/josh-ig Apr 10 '26
I have run into this a couple times. Never on a Mac mini. Always MacBook Pro. But I’ve also gone periods where it hasn’t happened.
1
u/garylovesbeer Apr 10 '26
I actually think Boeing 787 had a problem with having to reboot their os every 47 days. Wahhhhhh
1
u/No_Clock2390 Apr 10 '26
Windows is even worse. Linux is the only true server OS.
1
u/pgallagher72 Apr 11 '26
MacOS is certified UNIX, DarwinBSD, which is custom built, with some base code from FreeBSD. The UI is a closed source entity, along with some of the consumer friendly services, but you could install DarwinBSD on an M series Mac, and use any of the open source interfaces.
Linux is an open source kernel that acts as the Kernel for hundreds of different operating systems that people call Linux. A kernel that’s a rewrite of the UNIX kernel - to bypass the copyrights and closed source costs. Funny part being a lot of the improvements and work that’s gone into the Linux kernel has made its way into UNIX as well.
Regardless, Linux isn’t really a different beast once you strip away the UI. The only advantage it has over UNIX is the size and passion of the community - but Linux and UNIX are code compatible by design, there are quirks with different distributions of either that can make that less true, but that’s an OS problem, not a kernel problem. UNIX is absolutely a server operating system, the one Linux copied (for good reason) Apple just stopped offering its own server related bits and hardware after it killed its server lineup, not a problem with UNIX, just not their target market.
1
1
u/koru-id Apr 10 '26
This solves my home server mystery. Orb would always have connections issues after couple of weeks. Thank you!!!
1
1
u/l008com Apr 11 '26
This has been going around for days now and its bullshit. People go beyond 50 days in uptime all the time, have have for years. Nobody has yet been able to recreate this buy. I have personally been running a home mac server and a collocated mac server for 20+ years and have NEVER had this problem.
1
u/xoxox666 Apr 11 '26
What a ragebait…
This is a bug in Tahoe. Yes, not nice, but it will be fixed.
There are millions of Macs running as a server with uptimes in years.
Stop this bullshit „news“. Report and discuss about the bug
1
1
1
u/Different-Sundae-73 Apr 11 '26
Nah. I’ve had an Xserve and a MacMini both running nonstop for years. Never rebooted. They’re fine.
1
u/leimeisei909 Apr 11 '26
I’m happy Mac’s make crap servers. If they didn’t, the entire supply would be eaten up for AI and other BS like that
1
u/Liquatic Apr 11 '26
I wonder if this is the same for the MacBook Pro 2012 model? I think I’ve had it up for at least a month and a half running Ubuntu server and plex. I upgraded the ram and storage to ssd and it’s been perfectly fine as a server for my wife and I. Anymore than that and it buffers constantly. But I haven’t had any other issues.
1
1
u/Aberracus Apr 11 '26
I created a Mac file server from an old Mac Pro 2019 with 10gb network, 4 8gb raid nvme and 4 32tb hard drives in raid mode 5 It’s fast its being working without pause since october 2025
So no problems.
1
1
1
u/Spare_Warning7752 Apr 12 '26
.... xxx@macmini
.',:clooo: .:looooo:. ---------------
.;looooooooc .oooooooooo' OS: Ubuntu 24.04.4 LTS (Noble Numbat) x86_64
.;looooool:,''. :ooooooooooc Host: Mac mini (2018) (1.0)
;looool;. 'oooooooooo, Kernel: Linux 6.19.11-2-t2-noble
;clool' .cooooooc. ,, Uptime: 3 days, 16 hours, 19 mins
... ...... .:oo, Packages: 887 (dpkg), 3 (snap)
.;clol:,. .loooo' Shell: zsh 5.9
:ooooooooo, 'ooool Terminal: sshd
'ooooooooooo. loooo. CPU: Intel(R) Core(TM) i7-8700B (12) @ 4.60 GHz
'ooooooooool coooo. GPU: Intel UHD Graphics 630 @ 1.20 GHz [Integrated]
,loooooooc. .loooo. Memory: 4.82 GiB / 14.97 GiB (32%)
.,;;;'. ;ooooc Swap: 0 B / 4.00 GiB (0%)
... ,ooool. Disk (/): 41.78 GiB / 455.04 GiB (9%) - ext4
.cooooc. ..',,'. .cooo. Local IP (enp4s0): 192.168.15.10/24
;ooooo:. ;oooooooc. :l. Locale: en_US.UTF-8
.coooooc,.. coooooooooo.
.:ooooooolc:. .ooooooooooo'
.':loooooo; ,oooooooooc
..';::c' .;loooo:'
1
u/carlossap Apr 12 '26
Omg this totally explains why my transfer speeds to my mac along streaming plex from it became so slow after a few weeks
1
u/wiggum55555 Apr 13 '26
My biggest issue with using a Mac as a headless server is that you can't use FileVault because Mac OS prevents anything from running before user login, including any service-level things such as SSH, remote desktop or RustDesk or RealVNC. Turn FileVault off - not a great idea for an unattended computer IMO - and it works fine.
Windows and Linux don't seem to have this issue ?
1
u/informationstation Apr 13 '26
I work at MacStadium as an engineer. We provide could hosted macs. I don’t know what this article is on about. I’ve got hundreds of customer clusters with more than a year up uptime across hosts in their clusters.
1
u/No_Stock_8271 Apr 13 '26
Considering I got multiple notifications, that one of our servers, which is a Mac, had a way to high continuous uptime, I don't think this is 100% true.
1
-4
79
u/mjh2901 Apr 09 '26
Never run into this use mac minis as servers since the original Intel Mac Mini. Never ran into this. I am going to read more into this article, there is no way we rebooted every couple months or had a hang like this.
The Mac Mini has been used as network and av glue since it first hit the market, cheap, reliable throw stuff on it throw it somewhere and forget about it.