So I run up the application in a terminal window:
Mac:MyMVCApp user$ dnx . kestrel
Started
The app starts fine. I then browse to my application and voila:
An unhandled exception occurred while
processing the request.
IOException: kqueue() FileSystemWatcher has reached the maximum number of files to watch.
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x103c6a9d0 + 0x00029> in
<filename unknown>, line 0Cause
This is a known issue with new OS X kqueue FileSystemWatcher which will consume all file descriptors when watching very large directories:
http://www.mono-project.com/docs/about-mono/releases/3.12.0/
Solution
Pretty simple really, just issue the following command:
export MONO_MANAGED_WATCHER=false