Created attachment 183962 [details] the patch On large collection of photographs Digikam opens too many files. Even a 30K system limit is not enough. It seems to be a problem with file monitoring. The following patch uses the same workaround as on OSX and Windows: enables monitoring of the directories only, rather than all files.
I think this bears re-testing with current Digikam (eh .. the KF5 port, I mean, which is ready in Area51) since the old code refers to "improvements in QFileSystemWatcher in Qt 5.1". No sense in patching something that is shortly to be replaced.
Also you could simply raise the limit via sysctl :)
There are workarounds, and a newer version of the application, and I'm not in a position to test this (because I don't have 30k photos).