Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

NikolausDemmel

macrumors newbie
Aug 3, 2021
5
0
Yes!! This issue has been plaguing me for over a year on and off and it has been driving me crazy (on Catalina, across all patches). I've tried to search for a solution before multiple times and found other descriptions, but never a solution. Finally, I came across this thread and increasing the maxfiles limit (using a launch daemon) seems to have completely fixed it.

Thanks OP for your detailed description and persistence with updates, and thanks to everyone contributing to the solution.

PS: I also have TimeMachine backup to a Synology NAS and I did noticed weirdness with mdworker-related processes before (and many of them running at the same time). So maybe this setup contributes to running into the original maxfiles limit...
 

NikolausDemmel

macrumors newbie
Aug 3, 2021
5
0
Nooo... after a week without issues the problem returned today...

Still, it seemed to last much longer than usual (used to be around 1-2 days after reboots).

For limits I had set something like 64000 and 200000. I've increased them even more now. Let's see if that pushes it back further, or if there is something else going on in addition.

One thing I've noticed this time and also before is that the largest process ids are in the high ten-thousands. It seems like many processes get (re-)spawned over time. The most recent processes not too long after reboot are lots of mdworker_shared, around 20 of them, with process ids in the four-thousands. I guess related to spotlight and also time machine. A few hours later, and I still have around 20 of them, now with process ids in the 22 thousands. Not sure if it is normal that these processes are so short-lived...

Another thing that I have noticed is that once the problem occurs, one process that is ALWAYS frozen (unresponsive and marked "red" in Activity Monitor) -- besides Chrome of course if you try to close it -- is com.apple.hiservices-xpcservice. Not sure if that is a symptom or part of the problem.

Any additional hints are very welcome...
 

NikolausDemmel

macrumors newbie
Aug 3, 2021
5
0
Some additional observations:

- I've noticed `com.apple.hiservices-xpcservice` being frozen also before the issue occurs. So this might (or might not) be unrelated.
- I have lot's of `com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0B000000-0500-0000-0000-000000000000[16658]): Service exited due to SIGKILL | sent by mds[186]` entries in `system.log`. This would also explain the respawning processes and ever increasing PIDs. Looks like this is related to TimeMachine (see also https://www.reddit.com/r/hackintosh/comments/h89joe ). And maybe it is to do with backing up to a network share on a Synology NAS. I remember others in this thread noting that they also use TM with a Synology NAS.
- Time Machine backup is working, albeit slowly.
 

ewu

macrumors regular
Apr 14, 2020
113
74
Mac OS Catalina latest version is 10.15.7 not 10.15.4
 

chill991

macrumors member
Apr 8, 2020
93
53
Started having this problem this past week, made the changes for max files, and hopefully this puts the issue to bed.
 

Tinkertect

macrumors newbie
Feb 16, 2022
3
0
I just installed a new SSD on 27 iMac and a new Catalina OS via Internet download, migrated app and files from backup. Things seemed to be okay, then Google Chrome froze and Safari froze. Force quit many times trying different things I have read here and elsewhere. Chrome seems to freeze when opening the 7th or 8th tab, Safari fewer tabs. I hit on turning Javascript off (in GC and Safari), then the browsers would continue to work properly. Then, Gmail only works in HTML (probably other sites as well). Do this Javascript issue give any of you a clue towards a solution?
 

Fomalhaut

macrumors 68000
Oct 6, 2020
1,993
1,724
I just installed a new SSD on 27 iMac and a new Catalina OS via Internet download, migrated app and files from backup. Things seemed to be okay, then Google Chrome froze and Safari froze. Force quit many times trying different things I have read here and elsewhere. Chrome seems to freeze when opening the 7th or 8th tab, Safari fewer tabs. I hit on turning Javascript off (in GC and Safari), then the browsers would continue to work properly. Then, Gmail only works in HTML (probably other sites as well). Do this Javascript issue give any of you a clue towards a solution?
OP here. In my case, and I think several other people's, the issue was caused by the OS allocation of file handles hitting a limit that was set too low by macOS. This is possibly related to TimeMachine creating a large number of file handle requests that caused the limit to be hit. This then stopped new files being opened, which manifested itself as a failure to create new browser tabs. The solution was to increase the file handle limit (as explained in the thread).

However, this may have already been done in current releases of the OS. I haven't had this problem even after updating macOS Catalina and upgrading to Big Sur, so it may have already been fixed.

What macOS version are you using?

Are you using Time Machine backups?

I doubt this is related to JavaScript, and disabling it will greatly limit web page functionality these days.

Try disabling Time Machine if you are using it, or run the diagnostic commands to see how many file descriptors and open files you are using.

ulimit -n

sudo launchctl limit maxfiles

lsof -n -b | wc -l


The fix (for me) on Catalina was to increase the number of file handles to a much higher minimum and maximum, e.g.

sudo launchctl limit maxfiles 65536 200000

see https://wilsonmar.github.io/maximum-limits/
 

Tinkertect

macrumors newbie
Feb 16, 2022
3
0
My Mac is a late 2013, 24MB RAM, new 2TB SSD installed internally, old 500GB SSD placed in dock. (I have another Mac that is almost identical that has not problem, however it has never had Time Machine run on it.) New SSD erased and Catalina 10.15.7 downloaded, data migrated from old SSD again fresh this morning. I have used Time Machine previously, but not after this load refresh. I have not used Terminal much, but I succeeded in following your suggestion to change the maxfiles limits. Then testing Chrome the first time 8 tabs opened okay before freezing, subsequent Chrome tests (after Force Quit) froze with fewer tabs. A Restart test caused the ulimit to reset to 256. (wilsonmar said: "PROTIP: Because this would go back to defaults on reboot, add this command in your ~/.bash_profile"; IS that added to the sudo line you use?
 

Tinkertect

macrumors newbie
Feb 16, 2022
3
0
Later, after three hours of yard work therapy, I removed Chrome App Extensions and my problem seems to have gone away. Now my wife can have her computer back and I will live.
 

NikolausDemmel

macrumors newbie
Aug 3, 2021
5
0
Another update: I've been running with automatic backup to Time Machine disabled for many months now, and the issue has not come back, so I have the suspicion that it's somehow related to Time Machine running in the background (or just frequently) and maybe also the mdworker processes constantly respawning that makes the system run out of resources. Increasing the maxfiles limits definitely helps to delay the issue. And I still suspect that backing up to a (Synology) NAS somehow can aggravate the issue (even though some users in this thread have it also w/o Synology NAS).

I do run Time Machine backup manually every few days. It's not ideal to not always have up-to-date local backups (although I do also have cloud backup with Backblaze running on my machine). But if you are desperate for a workaround and increasing the maxfiles limits alone didn't help, you can give disabling automatic Time Machine backups a try.
 

star trek

macrumors member
Apr 1, 2013
37
1
Hello Everyone... I am on Catalina latest build and have problems of Freezing....have created the : com.private.maxfiles.plist with sudo and works at every boot 65536 to 200000 but keeps freezing when it want... Now I installed "Caffeinated 1.20" to keep alive my Mac and so far it is working good to see but should wait a little more if it's really stable...!!!!!!
 

Macintosh IIci

macrumors newbie
May 8, 2022
3
0
Here is what has solved this problem for me (at least for the moment), but it did not solve the issue when using Firefox: I rebooted my machine holding Command-R. Then, I ran Disk Utility's First Aid on my internal Fusion drive. I ran First Aid on both portions of the drive, including the section labelled "Data".

After doing that, I was able to login to my online banking and webmail for the first time in weeks (using Safari and Chrome) on my iMac. However, when I switched to Firefox to try and register a user account here at MacRumors, Firefox froze as soon as the "Register" page & sign-up form appeared. This problem of "register" or "login" pages freezing (whether it is a banking site, eBay, or webmail) has been a constant issue for me when using the most up-to-date versions of Chrome, Safari and Firefox. But as I mentioned, after running First Aid, the only problematic browser seems to be Firefox right now.

It doesn't surprise me that Firefox is still not working when the other two browsers are back in action. I have experienced many instances in the past where Firefox will not fully display the content of a given site, but when I switch to either Safari or Chrome those very same sites work fine.

Hope this info might be of assistance to others who are experiencing the same Mac problems.

My system:
2019 27" iMac w/ Fusion HD
Catalina 10.15.7
 

Macintosh IIci

macrumors newbie
May 8, 2022
3
0
An update to my above post. The problem came back within minutes on all 3 browsers: Chrome, Safari, Firefox.

So, I tried the steps below which were kindly suggested by users of this thread, but those steps ultimately did nothing to fix the problem on my iMac. Based on what I have read on the four pages of this thread, the one permanent solution that might work for me is to upgrade to Big Sur — which I cannot do right now, because some of my music software isn't compatible with it. Needless to say, I feel that this problem is inexcusable. If it is true that Apple was willing and able to solve the issue within Big Sur, then it should have done the same with Catalina — an OS that is still supported.

Here are the additional steps which I took, which ultimately did not work:

- checked to see if I was running any Chrome extensions (I was not)

- checked to see if I had Flash installed (I did not)

- Backed-up these files, then deleted all of the files in my /Library/Preferences/SystemConfiguration folder (except for com.apple.Boot.plist, which can't be deleted). Rebooted.

- in Terminal, I ran this:
sudo launchctl limit maxfiles 65536 200000

- But, I did not do this, as setting up a new profile that would actually function was proving to be confusing and time consuming: "Create a new location profile in Network -> Locations -> Automatic, unlock the lock, click edit locations and create a new one."

I will update to Big Sur in the near future, and will report back.
 

Macintosh IIci

macrumors newbie
May 8, 2022
3
0
Now I installed "Caffeinated 1.20" to keep alive my Mac and so far it is working good to see but should wait a little more if it's really stable...
Based on your post, I took a chance and bought Caffeinated from the App Store. Unfortunately, it did not fix the browser-freezing-problem on my machine. But then again, that should not have been a surprise to me, as it is not an app that is designed to combat the browser-freezing-problem issue. I just thought I would give it a shot, as I will try anything at this point.

Rather than waste yet more time, I will be updating to Big Sur asap, and will report back.
 

star trek

macrumors member
Apr 1, 2013
37
1
Based on your post, I took a chance and bought Caffeinated from the App Store. Unfortunately, it did not fix the browser-freezing-problem on my machine. But then again, that should not have been a surprise to me, as it is not an app that is designed to combat the browser-freezing-problem issue. I just thought I would give it a shot, as I will try anything at this point.

Rather than waste yet more time, I will be updating to Big Sur asap, and will report back.
if U connect via wifi try to use the wireless and see if this Do the Magic.....a wifiUsbdongle doesn't cost too much ......On my Hackintosh Catalina I have finally got a stable Catalina connecting via Usbwifidongle....maybe some kext was wrong in your case the wificard could have with some imperfection problems, trying to connect via wireless u can check if the problem disappears....Try to make a Firmware Update....have a Good Day Everyone
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.