-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File watching worked in 0.12.1 but does not in newer versions with Vagrant/Virtualbox/NFS shared folders configurations #931
Comments
We updated dependencies (chokidar) around v0.12.1, can you help to figure out whether this problem is related to var chokidar = require('chokidar');
var watcher = chokidar.watch('current directory', {
ignored: /[\/\\]\.|node_modules/,
persistent: true,
ignoreInitial : true
}).on('all', function(event, path) {
console.log(event, path);
}); Appreciate! |
Thanks @Tjatse. I can confirm that the issue appears to lie in chokidar. I ran the above test against chokidar |
@43n79w Thats nice, and thanks a lot. Can you describe this on chokidar issues? and reference to this by using |
I ran into this issue in my own project using chokidar w/ vagrant/parallels/boot2docker. The problem is that the |
Is there missing a word? So, @caseywebdev what's your solution? Setting |
maybe we should expose all the |
Indeed it'd also fix #870 (followSymlink) |
Sorry, it defaults to |
Hi, I can confirm this bug, using Linux with local file systems only. PM2 Version 0.12.1 is working, 0.12.2 and 0.12.3 is continously restarting the app. Tried some debugging on pm2:watch but this seem not even involved... |
@soyuka what is the actual fix/resolution? |
You can now change chokidar options through the @caseywebdev wrote:
So, you can change the /edit: I've added some docs about the chokidar use: https://github.com/Unitech/PM2/blob/master/ADVANCED_README.md#watch--restart. PM2 is giving those default options to chokidar:
Other options are the one defined by chokidar, for example /edit 2: while using NFS use |
This allows us to set watch options, see Unitech/pm2#931
It still doesn't seem to be working for me with the following options:
Am I missing something? |
What's your setup? Are you using os x? NFS? |
We're using nfs to mount OSX folder to Linux.
|
So, just tried this exact configuration "watching an nfs mounted directory from os x". I just left the default settings and it worked, it seems that My recommendation with your settings will be to:
I don't know why you'd need If it doesn't work, you can also use
|
Thanks for the investigation. I'll have to try it out with 0.12.4. We're currently using iojs 2.3.x so maybe that has some issues. I also haven't built fsevents so I'll take a look at that as well. |
Using Vagrant (1.7.2) with Virtualbox (4.3.20) on Mac OS X 10.10.1 and a Vagrant configuration which does the following:
In version 0.12.1 of PM2, I could edit a watched file on my Mac OS X host and PM2 would correctly restart the application. In (at least) 0.12.3 of PM2, this is no longer the case. If I SSH into the Virtualbox and touch the same file there, PM2 restarts the application.
I've debugged this for a couple of days and tried many different Vagrant/Virtualbox/Docker configurations thinking the issue lay there. But on a whim I tried installing an older version of PM2 that had been working in a similar project, and things started to work. I noticed that there were some file watching changes in 0.12.2. Perhaps some of these changes are causing this behaviour?
The text was updated successfully, but these errors were encountered: