Subject: Number of NSMetadataQuery objects limited?


I am running into a problem with having more than 32 NSMetadataQuery objects around (started and still allocated).

When I start my queries for a certain scope (in this case a directory containing 1.500 files, which has been indexed by a custom spotlight importer before), I cannot get more than the first 32 queries to return. The 33rd qery starts without indicating an error but never fires its finish/update notifications.

I tried to change the number and order of the queries, but I'm still stuck at the number of 32.

I also tried starting the queries one after another, so that a new query only starts after the previous query has returned something. No change in behaviour either.

I tried tinkering with enableUpdates/disableUpdates methods, but that didn't change anything.

However, releasing the NSMetadataQuery object immediately after it fired it's NSMetadataQueryDidFinishGatheringNotification gave me the expected result. All queries returned with valid results. But since I want the queries to stay around and notify me about file changes, that doesn't help me at all.

Is 32 a known limit for the number of started and still allocated NSMetadataQuery objects?

Or I'm running into some kind of Unix file descriptor limit in my test environment?
I'm not sure wich mechanism NSMetadataQuery employs under the hood to communicate with the meta data server.

Thanks for your help,


Cocoa-dev mailing list (Cocoa-dev@xxxxxxxxxxxxxxx)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)

Help/Unsubscribe/Update your Subscription:

This email sent to maillist...