Log file needed
Hlsgs opened this issue · 11 comments
Hello!
Is it possible to activate logging? I sometimes have to wait for a considerable amount of time before I see changes I've made to PHP files play out on the VM server and I wish to check if it's Winnfsd being "lazy" or some sort of PHP caching mechanism at play.
Thank you!
With caching and PHP, you can check a couple of things within the VM.
If you using NGINX, make sure sendfile
is off.
https://coderwall.com/p/ztskha/vagrant-apache-nginx-serving-outdated-static-files-turn-off-sendfile
In addition, if opcache is being used ensure this is set opcache.revalidate_freq=0
@Hlsgs you can enable logging with https://github.com/winnfsd/vagrant-winnfsd#logging
But winnfsd does not cache file contents, so the culprit is probably some configuration inside the vm (as @jamesmacwhite already pointed out)
@marcharding I've tried all the mentioned settings. I've also read somewhere(can't remember where) that winnfsd sometimes gets "lazy" after some time in use. And that's what seems to be happening. I really don't want to lose the performance of winnfsd, since Rsync seems to not work on windows.
I'm using it with Vagrant via a Puphpet.com config. Any idea how to enable logging in that context?
@Hlsgs so the "log" (currently it is not logged but shown in a console window) from the config.winnfsd.logging option does not show anything unusual?
Nothing is "freezed", it is just that your file changes from you host won't show up inside the guest, right?
Does this only apply to the content of a file or also to new files/filenames?
@marcharding I actually don't know how to activate said log console window in the context of Vagrant/PuPHPet. Or can I somehow open it globally?
see https://github.com/winnfsd/vagrant-winnfsd#logging (this goes into your Vagrantfile)
@marcharding I've read that and tried all sorts of stuff, but the problem is that I have no experience with Vagrant outside of PuPHPet, and the latter does not use a propper Vagrantfile. Is there some modification I can make to your plugin's files to force the logging window always on? I'm aware that those would be lost on plugin update, but, hopefully, I will only be needing the log until I figure out what's what. Thanks!
Sorry i'm not familar with PuPHPet.
Still, there must be some modification i can do to your plugin's files to enable the console globally, no?
You can modify
%HOMEPATH%\.vagrant.d\gems\[VERSION]\gems\vagrant-winnfsd-1.4.0\bin\nfsservice.bat
Change
start "" "%~dp0winnfsd" -log %2 -pathFile %3 -id %4 %5
to
start "" "%~dp0winnfsd" -log on -pathFile %3 -id %4 %5
Cool, thank you!