Skip to content
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

PM2:Watch - Using GlusterFS - Only restarting on one server #1677

Closed
mikeeaton83 opened this issue Oct 7, 2015 · 5 comments
Closed

PM2:Watch - Using GlusterFS - Only restarting on one server #1677

mikeeaton83 opened this issue Oct 7, 2015 · 5 comments

Comments

@mikeeaton83
Copy link

Here is my setup:

I have two servers (Web-01 and Web-02) which are load balanced. I have watch enabled and I am using GlusterFS to mirror the files between the two servers. So /var/www/l008/ is the GlusterFS Volume Mount point and is the same on both servers

If I touch a file on Web-01 then the process is restarted on Web-01 but not Web-02 and vice-versa on Web-02. My question is, is this a GlusterFS issue not raising the event on both servers or is this PM2 not seeing a change if it didn't originate on that server?

I have been using DEBUG="pm2:watch" and no events are raised on the 'other' server but are on the server that the touch was done from.

Let me know if you need anything else.

Thanks!

@soyuka
Copy link
Collaborator

soyuka commented Oct 7, 2015

Internally pm2 uses https://github.com/paulmillr/chokidar. I think that they'll have a better clue about this than I. May you open an issue there? I know that there are issues with NFS but I'm not familiar with GlusterFS.

@mikeeaton83
Copy link
Author

Yeah, I realised after posting. I'm just setting up a test case. sorry for bothering you :)

@mikeeaton83
Copy link
Author

Hey, just an fyi, issue replicated using just chokidar in isolation. :)

paulmillr/chokidar#364

@soyuka
Copy link
Collaborator

soyuka commented Oct 7, 2015

#931 (comment)
Glad usePolling fixed it.

@soyuka soyuka closed this as completed Oct 7, 2015
@mikeeaton83
Copy link
Author

Just in case anyone comes across this issue, GlusterFS is considered a Network File System I guess so usePolling:true fixes the issue.

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

No branches or pull requests

2 participants