{"id":40447,"date":"2023-08-25T14:22:49","date_gmt":"2023-08-25T18:22:49","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=40447"},"modified":"2023-09-04T14:29:47","modified_gmt":"2023-09-04T18:29:47","slug":"macos-13-5-no-longer-allows-setting-system-wide-ulimits","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2023\/08\/25\/macos-13-5-no-longer-allows-setting-system-wide-ulimits\/","title":{"rendered":"macOS 13.5 No Longer Allows Setting System-Wide ulimits"},"content":{"rendered":"<p><a href=\"https:\/\/developer.apple.com\/forums\/thread\/735798\">axeman12<\/a> (via <a href=\"https:\/\/news.ycombinator.com\/item?id=37233295\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/forums\/thread\/735798\"><p>As of the newest MacOs releases (11.7.9, 12.6.8, and 13.5) I am no longer able to increase the ulimit of my computer using the strategies <a href=\"https:\/\/wilsonmar.github.io\/maximum-limits\/\">outlined<\/a> <a href=\"https:\/\/apple.stackexchange.com\/questions\/453050\/how-to-increase-global-maxfiles-ulimit-on-osx-13-1-ventura\">here<\/a>.<\/p><p>[&#8230;]<\/p><p>This is relevant for me as I am using Vite which is currently broken and blocks me from developing locally. It is mentioned in their <a href=\"https:\/\/vitejs.dev\/guide\/troubleshooting.html#requests-are-stalled-forever\">troubleshooting page<\/a> that Vite causes a large number of open files and how to increase the limit.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/developer.apple.com\/forums\/thread\/735798\">Quinn<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/forums\/thread\/735798\">\n<p>Changing a system-wide setting to work around an issue with a specific product seems rather extreme. A better option would be to change it for that process specifically. If you have access to the code, add a call to <code>setrlimit<\/code>. If you don&rsquo;t have access to the code, you could work out how the code is launched and add a wrapper, using either a shell script (and hence <code>ulimit<\/code>) or a native executable (<code>setrlimit<\/code> again).<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/developer.apple.com\/forums\/thread\/735798\">Apple Staff<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/forums\/thread\/735798\"><p>This is in fact a bug. Good news is, there&rsquo;s a workaround!<\/p>\n<pre>launchctl limit maxfiles 256 unlimited\nlaunchctl limit maxfiles 128000 524288<\/pre><\/blockquote>\n<p>However, one commenter says this doesn&rsquo;t work. What does seem to work is turning off System Integrity Protection.<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2023\/07\/24\/macos-13-5\/\">macOS 13.5<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2023\/07\/24\/macos-12-6-8-and-11-7-9\/\">macOS 12.6.8 and 11.7.9<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2016\/12\/20\/dtrace-at-home\/\">DTrace at Home<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>axeman12 (via Hacker News): As of the newest MacOs releases (11.7.9, 12.6.8, and 13.5) I am no longer able to increase the ulimit of my computer using the strategies outlined here.[&#8230;]This is relevant for me as I am using Vite which is currently broken and blocks me from developing locally. It is mentioned in their [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2023-08-25T18:22:53Z","apple_news_api_id":"6b6a1139-624f-42d8-aea5-c2d31c5b1a66","apple_news_api_modified_at":"2023-09-04T18:29:49Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/Aa2oROWJPQtiupcLTHFsaZg","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[131,30,2223,1235],"class_list":["post-40447","post","type-post","status-publish","format-standard","hentry","category-technology","tag-bug","tag-mac","tag-macos-13-ventura","tag-system-integrity-protection"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/40447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=40447"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/40447\/revisions"}],"predecessor-version":[{"id":40528,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/40447\/revisions\/40528"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=40447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=40447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=40447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}