About an hour ago I suddenly experienced a strange issue on my mac running macOS 10.14.4 where a number of apps started failing with the error “too many open files”. At the time I didn’t think I was doing anything particularly unusual, and am not sure what caused this situation to occur.
However, after it cleared up, I was shocked to discover that a huge number of files from my Nextcloud folder were missing. I can only presume that this “too many open files” error that was occurring system-wide caused Nextcloud to fail to write files to disk, causing them to be silently deleted.
Fortunately they still exist in my Nextcloud server and can be found in the web UI. And I have a Time Machine backup on my mac which I’m using to restore the last backed up version of my Nextcloud folder so that I don’t need to re-sync 9 GB of data.
However, I’m concerned that Nextcloud could have been the culprit here. Is it possible it had too many open file handles? I’ve never experienced that problem before in the 16 years I’ve been using macOS / OS X / Mac OS X, and I only just recently started using Nextcloud a few weeks ago.
Regardless, I feel that it failing to open files due to a “too many open files” error should not result in dataloss like it did, and that this may be a severe bug in Nextcloud’s desktop client.
Does anyone else agree?
Perhaps I should make a bug report in the nextcloud/desktop issue tracker on github?
Is there anything else I can do to prevent this from happening again?