Re: Excessive open gui graphics files on Mavericks
Re: Excessive open gui graphics files on Mavericks
- Subject: Re: Excessive open gui graphics files on Mavericks
- From: Greg Parker <email@hidden>
- Date: Tue, 08 Apr 2014 20:26:03 -0700
On Apr 8, 2014, at 12:13 PM, Michael Domino <email@hidden> wrote:
> Some of my customers running on Mavericks are having problems with "too many open files" errors. Raising the limit does solve the problem, but I've noticed that on 10.6, at idle, my app opens about 47 files, none of them gui graphics files. On Mavericks, the very same build of the app opens 102 files and keeps them open for the duration of the process existence.
Dumb solution: raise the open file limit.
The default limit for an application double-clicked in the Finder is 256 descriptors. You can raise it by calling setrlimit() with the RLIMIT_NOFILE option. Setting it to something like 512 or 1024 during your app's launch should help your customers out while you figure out if there is excessive descriptor use in your app or in the OS.
If your customers start hitting the higher limit then you know you have a more serious problem to resolve. There is a system-wide limit (around 20K IIRC) so you can't just raise it forever.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden