You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same as #44
I suspect its how the container sends events to the host due to the difference in file systems and their synchronization. Sometimes it works fine and sometimes it stops working altogether. Removing large folders like vendor and .git helped the rebuilds. Giving more resources helped as well, but it still occurs from time to time
@pycckuu I tried reinstalling docker but it didnt work, plus I have tried it over 10 MacBooks at work and same result for everyone, reload works several times and afterwards doesn't recognize changes.
Sadly I have no macs available so it is hard for me to debug this but I doubt there is anything I can actively do at this point. It is either fsnotify/fsnotify that has issues or the implementation of the bind mount between MacOS host and the container.
Thanks to @HurSungYun, CompileDaemon now supports -polling=true which switches from FS notifications to active polling for changes. While this is neither instant (notifications are delayed by the polling rate) nor resource friendly (always looking instead of being event driven) it is a workaround to help get people back to work. I strongly discourage you from using this in any production environment.
@githubnemo It would be great if warnings are documented in READMD.md. Can I update it?
oh you already updated it. nevermind XD
Yep but thanks anyway :)
Btw, I believe using hot-reload daemon for production is not a good practice in itself, isn't it?
I have nothing against using fsnotify based hot-reload but using polling should be discouraged as it is quite wasteful and should never become a default or habit just because there's a bug somewhere.
(But you are right of course, normally you would expect your artefacts to be stable and not need hot-reloading once shipped to production, as such I would see it as bad practice to use hot-reloading in production.)
I started having this problem with the latest versions of docker-desktop. One thing I noticed was the default behavior of enabling the Use gRPC FUSE for file sharing flag in the preferences. Turning this off, and restarting my machine, seemed to resolve the issue.
Perhaps others will have luck with toggling this option off?
Activity
paologf-mb commentedon Mar 5, 2020
Here the code example repository https://github.com/paologf-mb/go-docker-compiledaemon
paologf-mb commentedon Mar 10, 2020
Any help?
funktionslust commentedon Mar 12, 2020
@paologf-mb Did you try it with go 1.12?
yuraxdrumz commentedon Mar 12, 2020
Same as #44
I suspect its how the container sends events to the host due to the difference in file systems and their synchronization. Sometimes it works fine and sometimes it stops working altogether. Removing large folders like
vendorand.githelped the rebuilds. Giving more resources helped as well, but it still occurs from time to timepycckuu commentedon Apr 26, 2020
is it related to this post?
https://www.reddit.com/r/golang/comments/c7gtzm/go_modules_docker_and_hotreload_problems/
pycckuu commentedon Apr 28, 2020
In my case, it was Docker issue. After reinstallation of Docker, everything worker fine. Thanks!
yuraxdrumz commentedon Jul 5, 2020
@pycckuu I tried reinstalling docker but it didnt work, plus I have tried it over 10 MacBooks at work and same result for everyone, reload works several times and afterwards doesn't recognize changes.
githubnemo commentedon Nov 9, 2020
Sadly I have no macs available so it is hard for me to debug this but I doubt there is anything I can actively do at this point. It is either
fsnotify/fsnotifythat has issues or the implementation of the bind mount between MacOS host and the container.githubnemo commentedon Nov 29, 2020
Thanks to @HurSungYun,
CompileDaemonnow supports-polling=truewhich switches from FS notifications to active polling for changes. While this is neither instant (notifications are delayed by the polling rate) nor resource friendly (always looking instead of being event driven) it is a workaround to help get people back to work. I strongly discourage you from using this in any production environment.HurSungYun commentedon Nov 29, 2020
@githubnemo It would be great if warnings are documented in READMD.md. Can I update it?
Btw, I believe using hot-reload daemon for production is not a good practice in itself, isn't it?
HurSungYun commentedon Nov 29, 2020
oh you already updated it. nevermind XD
githubnemo commentedon Nov 29, 2020
Yep but thanks anyway :)
I have nothing against using fsnotify based hot-reload but using polling should be discouraged as it is quite wasteful and should never become a default or habit just because there's a bug somewhere.
(But you are right of course, normally you would expect your artefacts to be stable and not need hot-reloading once shipped to production, as such I would see it as bad practice to use hot-reloading in production.)
justinpage commentedon Dec 6, 2020
I started having this problem with the latest versions of docker-desktop. One thing I noticed was the default behavior of enabling the
Use gRPC FUSE for file sharingflag in the preferences. Turning this off, and restarting my machine, seemed to resolve the issue.Perhaps others will have luck with toggling this option off?