Skip to content
This repository was archived by the owner on Feb 13, 2019. It is now read-only.

branch: beta4 kqueue() FileSystemWatcher has reached the maximum nunmber of files to watch. #138

Closed
spboyer opened this issue Apr 28, 2015 · 19 comments

Comments

@spboyer
Copy link
Contributor

spboyer commented Apr 28, 2015

in web template getting the following error

$ dnx . kestrel

Browse to http://localhost:5001

An unhandled exception occurred while processing the request.

IOException: kqueue() FileSystemWatcher has reached the maximum nunmber of files to watch.
System.IO.KqueueMonitor.Add (System.String path, Boolean postEvents, System.Collections.Generic.List`1& fds) [0x00000] in <filename unknown>, line 0

System.IO.KqueueMonitor.Add (System.String path, Boolean postEvents, System.Collections.Generic.List`1& fds) [0x00000] in <filename unknown>
System.IO.KqueueMonitor.Scan (System.String path, Boolean postEvents, System.Collections.Generic.List`1& fds) [0x00000] in <filename unknown>
System.IO.KqueueMonitor.Setup () [0x00000] in <filename unknown>
System.IO.KqueueMonitor.DoMonitor () [0x00000] in <filename unknown>
--- End of stack trace from previous location where exception was thrown ---

empty, webapi running fine

@chrisdias @sayedihashimi @davidfowl

@spboyer
Copy link
Contributor Author

spboyer commented Apr 28, 2015

Yosemite OSX, mono 4.0.1

@chrisdias
Copy link

i forgot i had this in my .bash_profile and it seems to fix the problem.

export MONO_MANAGED_WATCHER=disabled

@sayedihashimi this needs to be documented on the asp.net site

@spboyer
Copy link
Contributor Author

spboyer commented Apr 28, 2015

added to bash_profile.
getting new error in web template

TypeLoadException: Could not load type 'Microsoft.Framework.Runtime.ILibraryExport' from assembly 'Microsoft.Framework.Runtime.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
System.Lazy`1[System.Collections.Generic.List`1[Microsoft.CodeAnalysis.MetadataReference]].CreateValue () [0x00000] in <filename unknown>, line 0
System.Lazy`1[System.Collections.Generic.List`1[Microsoft.CodeAnalysis.MetadataReference]].CreateValue () [0x00000] in <filename unknown>
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>
System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>
System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <filename unknown>
Microsoft.AspNet.Mvc.Core.FilterActionInvoker+<InvokeResultAsync>d__44.MoveNext () [0x00000] in <filename unknown>

@sayedihashimi
Copy link
Member

Adding @davidfowl @glennc @danroth27

Do you guys know of any fix/workaround?

@spboyer
Copy link
Contributor Author

spboyer commented Apr 29, 2015

Latest dnvm install this is still an issue.

$ dnvm list

Active Version              Runtime Arch Location             Alias
------ -------              ------- ---- --------             -----
                            mono         ~/.dnx/runtimes
       1.0.0-beta5-11624    mono         ~/.dnx/runtimes
  *    1.0.0-beta5-11649    mono         ~/.dnx/runtimes      default

@glennc @danroth27 @davidfowl @shanselman @sayedihashimi

@spboyer
Copy link
Contributor Author

spboyer commented Apr 30, 2015

@davidfowl @migueldeicaza @chrisdias @sayedihashimi

The web template runs under 1.0.0-beta4, #140 is still valid on dnu build, be sure that you are setting the dnvm to default

Active Version              Runtime Arch Location             Alias
------ -------              ------- ---- --------             -----
  *    1.0.0-beta4          mono         ~/.dnx/runtimes      default
       1.0.0-beta5-11625    mono         ~/.dnx/runtimes
       1.0.0-beta5-11631    mono         ~/.dnx/runtimes
       1.0.0-beta5-11657    mono         ~/.dnx/runtimes
       1.0.0.0-beta4        mono         ~/.dnx/runtimes

@Spencerooni
Copy link

@chrisdias Just encountered this. Your suggestion nearly worked for me but I had to use export MONO_MANAGED_WATCHER=false not export MONO_MANAGED_WATCHER=disabled.

@geirsagberg
Copy link

Had the same problem, export MONO_MANAGED_WATCHER=false fixed it for me as well.

@jrock2004
Copy link

With false will it detect change or do you still need to restart after every change?

@geirsagberg
Copy link

It would seem changes are not detected, unfortunately, so this is hardly a permanent solution.

@johnpapa
Copy link

export MONO_MANAGED_WATCHER=false fixes it for now, but I agree that the watcher should detect changes long term

@johnpapa
Copy link

any update on this @sayedihashimi or guidance?

@scionwest
Copy link

Using export MONO_MANAGED_WATCHER=false didn't solve the issue for me. Are there other work-arounds for this issue?

@geirsagberg
Copy link

It seems changes are not detected when using Kestrel regardless of whether MONO_MANAGED_WATCHER is true or false. Relevant thread: aspnet/Hosting#45

@usersxm
Copy link

usersxm commented May 10, 2015

I am having the exact same problem as you.
captura de pantalla 2015-05-10 14 45 59

That was after doing the false/disable thing.. Did you solve the problem?

@peterblazejewicz
Copy link
Member

@usersxm I'm afraid that is still a valid problem and fixing it depends on 3rd party

@ChidoYo
Copy link

ChidoYo commented Nov 16, 2015

Just wanted to upvote on what has been said. The following:
export MONO_MANAGED_WATCHER=false
Worked for me and I'm on OSX 10.11.1
I was getting the error above after installing new bower components.

@rolandjitsu
Copy link

In my case this issue occurs if I have for instance node_modules in the same place where the project is started. So if there would be a way for telling mono not to watch that folder, I think the issue would be fixed (at least in my case).

@peterblazejewicz
Copy link
Member

We are shutting this repo down, it's been replaced with dotnet new.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests