Skip to content

Play 2.3.2 auto reload is not working on shared folder #3246

Closed
itsliang opened this Issue Aug 3, 2014 · 2 comments

3 participants

@itsliang
itsliang commented Aug 3, 2014

I use vagrant and virtual box to create my dev environment. When I stored my play app on shared folder, the auto-reload is not working. If I moved my play app out of the shared folder, then auto-reload is working fine.

@cchantep
cchantep commented Aug 3, 2014
  • Which Play version? If not the latest (2.3.2), should be better to upgrade to be sure that hasn't been fixed meanwhile.
  • You should check whether date modification of file is properly updated in this case.
@jroper
Play Framework member
jroper commented Aug 4, 2014

This is expected - Play uses OS level hooks to watch for file changes, but vagrant/virtual box/network/shared filesystems generally don't implement these hooks, they simply ignore them, meaning it fails silently. There's nothing Play can do about this.

That said, if you're using Play 2.3.2 or later, there is something you can do, you can switch to our polling implementation. This will use a lot more CPU since it has to scan your whole source directory structure every 500ms to detect changes, but that's the only option available for detecting changes in your setup.

To configure this, add the following to your build.sbt:

PlayKeys.playWatchService := play.sbtplugin.run.PlayWatchService.sbt(pollInterval.value)
@jroper jroper closed this Aug 4, 2014
@jroper jroper added ddd and removed ddd labels Aug 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.