Comments (15)
@githubnemo plz add solution about fs.inotify.max_user_watches in notes section of readme
from compiledaemon.
A gotcha. This is from fsnotify.Watcher.Add()
which roughly translates to the inotify_add_watch
syscall which describes the failure mode ESPC
as follows:
ENOSPC The user limit on the total number of inotify watches was
reached or the kernel failed to allocate a needed resource.
Consider increasing the number of possible inotify watches.
from compiledaemon.
That is unexpected.
Any special things concerning your environment? OS? What file system are you using?
from compiledaemon.
Sorry for the delay.
After a few reboots and such I determined that running the command in visual studio code's integrated terminal causes this problem, and in some unknown cases can cause CompileDaemon to yield this error until reboot. I'm not sure what about VSC causes the error, or why it is permanent sometimes but I think it can be worked around by simply not running it in VSC :)
from compiledaemon.
Well, that's odd.
So I assume you are starting CompileDaemon more than once in the VSC terminal? Because Walk()
is only called once at the beginning. Maybe there are other instances of CompileDaemon lingering in the background, eating up all free file descriptors and at the end, Walk()
in the new instance cannot open any more files?
from compiledaemon.
In this case we only use CompileDaemon for one specific component of our software and only use it there. So there should have only been one instance.
I suspected that there was a lingering instance initially, but couldn't find evidence of that using ps or any other task manager. And it doesn't explain why after a reboot ->VSC start it'd be busted. I'll keep poking at it and will share anything interesting I find, but I don't know if there's anything in particular to figure out.
Thanks for paying attention to this :)
from compiledaemon.
Encountered the same issue on a fresh reboot. Not using VSCode but I am using Atom.
from compiledaemon.
@robbert229 any infos on the environment you are using? How do you invoke CD?
from compiledaemon.
I am running Arch Linux, and I was attempting to invoke
CompileDaemon -exclude-dir=./minio-data -exclude-dir=./neo4j-data -color -build="go build -o api.exe server" -command="npm run api" -graceful-kill=true -log-prefix=false
Edit
Found the solution! It turns out that -exclude-dir wouldn't exclude the desired directories, this is because of the ./ prefixing the directory name.The flag -exclude-dir=./vendor
wouldn't ignore the vendor
directory
Will looking through the source for the cause of my problems I saw that filepath.Walk
had somthing interesting in it. info.Name()
returns the name of the file. If it was walking over ./vendor/aws/foo.go
it would be foo.go
, is this intended behavior?
err = filepath.Walk(*flag_directory, func(path string, info os.FileInfo, err error) error {
if err == nil && info.IsDir() {
if flag_excludedDirs.Matches(info.Name()) {
return filepath.SkipDir
} else {
fmt.Printf("Adding: %s\n", path)
return watcher.Add(path)
}
}
return err
})
from compiledaemon.
This problem would be detected earlier if CD had a verbose mode, plotting the watched directories. Good job at identifying the problem, I haven't looked into it yet but this looks promising. I will look into this momentarily.
from compiledaemon.
@robbert229 thanks for finding the actual issue behind this problem! It should be fixed now.
from compiledaemon.
I still have this issue with Ubuntu 16.04 64bit after recompiling fix#23.
from compiledaemon.
@mrosentr Can you paste the command line of how you invoke CD and the output when starting with -verbose
?
from compiledaemon.
I use this one primarily:
CompileDaemon -directory=. -build="go build -o server" -command="./server" -color=true -verbose
Have also tried this:
CompileDaemon -directory=/path-to-source -build="go build -o server" -command="./server" -color=true -verbose
Output:
2017/03/15 14:22:17 Watching directory '.' for changes.
2017/03/15 14:22:17 filepath.Walk():no space left on device
from compiledaemon.
Increasing the inotify watches worked! ty!
from compiledaemon.
Related Issues (20)
- Console not showing, echo server not restarting
- Use CompileDaemon with go generate? HOT 4
- Latest commit tag not included in master
- include multiple directories HOT 2
- Terminate the program if a build fails
- Restart the program if it fails HOT 2
- Docker + Go 1.18 = /bin/sh: CompileDaemon: not found HOT 2
- package math/bits: unrecognized import path "math/bits" (import path does not begin with hostname) HOT 2
- Install for go 1.18+ HOT 10
- CompileDeamon not found golang 1.18 HOT 10
- "CompileDaemon": executable file not found in $PATH: unknown HOT 2
- Docker - File Changes not being Acknowledged
- Security Best Practice HOT 1
- 1.19 "stuck" on Build ok. HOT 3
- Support go.work
- Could not start command: can't start command: fork/exec ~/directory/to/go-project: no such file or directory HOT 1
- Go does not rebuild when .env file is changed
- Docker MacOS no rebuilding even with pulling on HOT 2
- error obtaining VCS status: exit status 128 HOT 1
- CompileDaemon did not install with vendor directory HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compiledaemon.