Enable auto synchronization/refreshing of local project files

I have one particular project that refuses to automatically refresh the project pane with updated files.

For instance, if I create a new image in Photoshop and save it to the project's assets directory, PhpStorm does not synchronize/refresh and show the new files. Then, upon uploading the file I'm working on in the IDE, I get errors saying that files are missing, as I have of course renamed or deleted some image files or what not.

I have 12 projects, and this is the only one that exhibits this behavior. I've gone through and compared the settings and preferences, but cannot find any differencing in configuration.

I'm forced to manually synchronize by right-clicking on a project file and clicking "Synchronize 'example.css'" or using the shortcut ctrl+alt+y

Any idea how I can get this project to auto-synchronize again and watch for changes to the directories in the project?

 

For reference:

Windows 10 Pro v1607

PhpStorm 2017.1.3

1

Hi there,

Please check idea.log (Help | Show Log in Explorer) for possible hints.

But in general: anything special about this project? Any symbolic links in the path or network shares/mounted drives used? Number of files in the project? Right now the symbolic link/junction point idea is my #1 suspect here.

1
Avatar
Permanently deleted user

Hey, thanks for your quick response.

The project files do indeed reside on a network mounted drive. Think that's the problem? There are no symbolic links in place.

The log is massive. I'm going to delete it and check back after working with the project a little more.

Thanks for your help.

1

>The project files do indeed reside on a network mounted drive. Think that's the problem?

Very likely.

In general, this IDE is designed in such way that requires very fast access to the source files .. and accessing files over network (be it real or even virtual) may add quite large delays (latency) .. so it takes time to check files for possible changes etc (e.g. you may see some random short freezes/delays in code completion).

In case of symbolic links it might be file system watcher itself that is failing (cannot detect any changes until restarted -- due to OS or file system related limitations) .. but for network accesses sources AFAIK it gets disabled by IDE on purpose (latency; sometimes it gets way too slow .. so it;s better not to have it running at all).

>The log is massive. I'm going to delete it and check back after working with the project a little more.

Good decision. But yuo can check it even in current one -- just look for most recent session -- check for file system watcher messages -- it might be something like "watcher disabled because network/shared folder is detected" (not exact words by any means -- rather overall idea of such message)

1
Avatar
Permanently deleted user

Sure enough:

2017-05-27 14:05:01,032 [ 8958] WARN - api.vfs.impl.local.FileWatcher - Project files cannot be watched (are they under network mount?) 
2017-05-27 14:05:01,033 [ 8959] INFO - tartup.impl.StartupManagerImpl - unwatched roots: [M:/Development/massive]
2017-05-27 14:05:01,033 [ 8959] INFO - tartup.impl.StartupManagerImpl - manual watches: [M:\]

So is there no way around this? I'm willing to take the performance hit.

I suppose I could move my development files locally and use something like Resilio Sync to keep them up to date on the NAS.

1

Yeah.

In general it's not "officially supported" scenario -- the recommended way is to have them on local HDD/SSD and setup automatic deployment (so all files will be copied over on save/modification detection)

Check links in https://confluence.jetbrains.com/display/PhpStorm/Deployments+in+PhpStorm

1
Avatar
Permanently deleted user

I haven't noticed any latency, but my NAS is connected via Thunderbolt, so it's not exactly your old school network mounted device.

I'll review that documentation. Thanks again for your help.

1
Avatar
Permanently deleted user

I actually don't see anything in there about network mounted drives, but between what you've said and the log from the application, I'll take it as truth. I wish there was more information about it, and a checkbox in PhpStorm that says "use at your own risk" so that I could have automatic watching in place by my choice instead of the application's.

1

Well .. lets wait till work day and see what devs/support team has to say about it (they may know some internal settings .. or OS-level config that would force file system watcher operational even in such scenario)

Right now I may only relay on what dev says: https://youtrack.jetbrains.com/issue/IDEA-119608#comment=27-1103693

You may search the Issue Tracker (IDEA project) using other keywords -- maybe you will find some better suggestions: https://youtrack.jetbrains.com/issues/IDEA?q=%22are%20they%20under%20network%20mount%22

 

>I actually don't see anything in there about network mounted drives,

That link that I gave you was about "Setting up an automatic deployment"

1
Avatar
Permanently deleted user

Right on. I'll wait and see.

 

Edit: I recall in v2015 or maybe even v2016 I would get warnings that the project files were on a network share so it may affect performance, but it never turned off watching completely. I wonder if this was changed in v2017?

1
Avatar
Permanently deleted user

It did this in previous versions too and the warning was exactly about this thing - we cannot watch over files located on the network share as this leads to huge problems with file synchronization and access due to the fact that SMB protocol simply cannot provide the required performance and IOPS and it does not matter where remote server is located (it may be even local VM running at the same workstation but SMB will kill it).

You can check if this notification is enabled in File | Settings | Appearance & Behavior | Notifications.

0

请先登录再写评论。