Right now, there is no way around, that sync can stop. Period :)
There are different reasons for that and we can only try to "work arround" or mitigate the impact of one, the other is d4m related and we cannot do anything about it.
Scenarios where this happens ( more often ):
- npm / webpack / gulp based projects where during watch / rebuild a lot of files are removed and created -> we cannot do anything in this case
npm ci / fresh npm install: same as above -> Try to always do that before you start the stack ( docker sync )
- sometimes also
composer install is enough -> also try to run this before you start the stack
In most cases, this has nothing to do with docker-sync at all, but with OSXFS getting stucked in the FS event queue, which then also stops events for unison in our docker image ( linux, so inode events ) and thus breaks syncing.
There is no fix to that - sometimes restarting docker sync helps, this means, that is an actual unison "too many events" issue, which can also happen for unison.
So what we have here:
a) OSXFS gets stuck -> docker for mac restart ist the only option, sometimes even only OS restart
b) unsion gets stuck -> restarting docker-sync with docker-sync stop && docker-sync clean && docker-sync start helps
There might be a way to auto-detect case b) since we already have monit ( AFAIK some already do that ) and then auto-heal itself.
We neither can avoid nor fix b) in general - it's not even sure it would need reimplemenation in Unison or its actually a OSXFS vs Inode event propagation related issue.
Right now, there is no way around, that sync can stop. Period :)
There are different reasons for that and we can only try to "work arround" or mitigate the impact of one, the other is d4m related and we cannot do anything about it.
Scenarios where this happens ( more often ):
npm ci / fresh npm install: same as above -> Try to always do that before you start the stack ( docker sync )composer installis enough -> also try to run this before you start the stackIn most cases, this has nothing to do with docker-sync at all, but with OSXFS getting stucked in the FS event queue, which then also stops events for unison in our docker image ( linux, so inode events ) and thus breaks syncing.
There is no fix to that - sometimes restarting docker sync helps, this means, that is an actual unison "too many events" issue, which can also happen for unison.
So what we have here:
a) OSXFS gets stuck -> docker for mac restart ist the only option, sometimes even only OS restart
b) unsion gets stuck -> restarting docker-sync with
docker-sync stop && docker-sync clean && docker-sync starthelpsThere might be a way to auto-detect case b) since we already have monit ( AFAIK some already do that ) and then auto-heal itself.
We neither can avoid nor fix b) in general - it's not even sure it would need reimplemenation in Unison or its actually a OSXFS vs Inode event propagation related issue.