GNOME Bugzilla – Bug 712349
kqueue monitoring, bump limits
Last modified: 2013-11-25 12:49:29 UTC
Created attachment 259854 [details] [review] setrlimit to bump nofiles Hi. kqueue(2) is very hungry for FDs when monitoring files and directories, so use the max NOFILES value as a base for setting up monitor limits. This mitigate the chance to run in the infamous "Too many open files"... I successfully tested this on OpenBSD where I was able to crawl and monitor big hierarchies of files and directories. Would it be OK to push? Thanks.
Since this change only impact BSD systems, I went ahead and pushed it: 0b3d4831a488427abbdbaef988b01f74a0870f9a
Thank you Antoine, the patch looks sane. Normally I wouldn't suggest we set the limit because this is not our responsibility. Let's see how we get on with this patch.
(In reply to comment #2) > Thank you Antoine, the patch looks sane. Normally I wouldn't suggest we set the > limit because this is not our responsibility. Let's see how we get on with this > patch. In a regular situation, I would agree with you. But the difference here is that the max number of monitors is based on the limits and it makes more sense to base it on the max limit rather than cur. If that triggers an issue in the future, we can easily limit the number of monitors to a specific amount. Thanks for the review ;-)