It seems that this is system specific issue as this is the first and the only report of this behavior. That is, the problem could be somewhere on your end. When the problem happens, could you check out what the "Activity monitor" says about Unity? Open the application, double click on the Unity row and navigate to the "open files and ports" panel. Copy the output and paste to the bug report you have submitted 775086. Thanks
I have also been facing this the past two days, in Unity 2018.6, on Mac OS. While searching I found related issues with the Mac OS itself having a limiter on how many files can be open at any time, to prevent any given program from draining all the RAM. Since the Error Messages all list Unity Temp Files, and there are sometimes 10 messages in a row offering "Force Quit", "Cancel", and "Try Again" as options, I have to assume that Unity is opening so many temp files that it is running into MacOS's safeguard against memory leaks. There is apparently a way to increase the Limit in MacOS itself, only in Sierra10.12, but it is risky, and I do not think the OS safeguards should have to be modified when an application needs to maybe clean up after itself better?
I'm getting "error CS0016: Could not write to file `Assembly-CSharp-firstpass'. Too many open files" when building, as of updating to Unity 2017.4.25.
I managed to fix the "too many open files" issue by opening a console and typing the following before running Unity... sudo su -root (Then enter password) ulimit -n 2048 (This ups the file limit) ulimit -a (a quick check to see if the limit has stuck)