burke / zeus

Boot any rails app in under a second.
MIT License
3.33k stars 231 forks source link

Many files problem on OSX Sierra #620

Closed sideshowcoder closed 7 years ago

sideshowcoder commented 7 years ago

It seems like there is a problem with fsevents when dealing with a large amount of files on OSX sierra this added test fails reliably on mac Macbook Pro, with the error

2017-01-17 22:52 filemonitor.test[69205] (FSEvents.framework)
FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc()
=> (null) (-22)

To test this up the count of files in filemonitor_test.TestFileMonitorFiles, to something like 5000 and the error will show up in the log when running make test-go.

To fix this the proposed quick solution is to on OSX monitor directories instead of files, when a file is added to the watch list compute the directory it is contained in and monitor this directory via FSEvents. This can cause more restarts than before.

fixes #607 #589

sideshowcoder commented 7 years ago

This has been released as 0.15.13.pre

gjtorikian commented 7 years ago

Thank you so much, @sideshowcoder!