On Apr 8, 2014, at 12:13 PM, Michael Domino <michael.dom...@identityfinder.com> 
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     gpar...@apple.com     Runtime Wrangler



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to