Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Stuck in CPU consuming accept loop when out of file descriptors #5025
Syncthing Version: v0.14.47, OpenBSD (64 bit)
I'm trying to sync a new directory with many subdirectories and files. A few minutes in, syncthing's web interface starts showing:
The two syncthing processes are now eating as much CPU as possible:
My login class has a limit of 8000 file descriptors, which I've already raised a bunch of times just trying to get this sync going. OpenBSD's default process limit is 1024 files.
Syncthing should be using
Maybe a better user experience would be to detect this situation and make it easy to go back to periodic scans so it doesn't just eat all CPU forever? I wasn't even sure how to disable kqueue watching (I only enabled it because the web interface presented me with a "this is new, do you want it on?" dialog) and guessed by editing the XML config. The web interface was not very responsive because both processes were eating all CPU at this point.
The accept loop is easy to treat; a