Open hrkrx opened 3 years ago
This issue is caused by the fact that after a period of idle activity, we shut down the WSL 2 VM for you. We do this to help conserve system resources and to make WSL 2 feel lightweight and transparent for users developer scenarios (AKA it starts when you need it to, is fast and shuts down when you're finished with it). WSL 2 instances aren't inherently made to be continuous file servers. I'd say that the best way to log this for the WSL team could be to change this to a feature request to change the timeout parameter for WSL 2, and we can evaluate that feature request in the future. If that seems like a path where your feedback is heard to you, then I can go ahead and do that. Thank you for filing this! :)
This issue is caused by the fact that after a period of idle activity, we shut down the WSL 2 VM for you. We do this to help conserve system resources and to make WSL 2 feel lightweight and transparent for users developer scenarios (AKA it starts when you need it to, is fast and shuts down when you're finished with it). WSL 2 instances aren't inherently made to be continuous file servers. I'd say that the best way to log this for the WSL team could be to change this to a feature request to change the timeout parameter for WSL 2, and we can evaluate that feature request in the future. If that seems like a path where your feedback is heard to you, then I can go ahead and do that. Thank you for filing this! :)
I think to being able to set the timeout as parameter for the wsl command would be absolutely acceptable!
Got it! I've changed the label of this to a feature and I've edited the title so it will be clear to our team on what this item is tracking. Thank you for the feedback π
Doesn't vmIdleTimeout
option do the trick? https://docs.microsoft.com/en-us/windows/wsl/release-notes#build-20190
Doesn't
vmIdleTimeout
option do the trick? https://docs.microsoft.com/en-us/windows/wsl/release-notes#build-20190
that handles the timeout for all instances instead of only one doesn't it?
any update on this?
This is annoying. I used to be able to keep WSL running. I liked having Linux applications at the ready. It was almost bare metal launch speeds. But now I have wait for services to load and the app take several seconds or more before it loads. Used to be two seconds or less. And now DNS doesn't even work anymore when trying to use systemd. Can we have the option to keep Linux running at all times if we have at least 16 GBytes of RAM? I really liked having the ability to run Windows and Linux apps simultaneously at near native speeds. Now I have to wait for everything after the Linux instance times out and shuts down.
Environment
I have a linux server that provides multiple NFS network drives. As NFS performance under windows is abysmal I use wsl2 to mount the NFS drives.
Steps to reproduce
Mount any NFS drive using wsl.exe as starting point.
That is working well performance wise (which is why i am doing this, as NFS under native windows is abysmal) but the issue is whenever I mount a network drive through wsl2 it gets unmounted rather quickly after a short time of idling.
WSL logs:
Expected behavior
A mounted drive should not be unmounted except the user is specifically unmounting it.
I have solved this issue by adding a
watch df -h
at the end of the script, but that is in my opinion not the best solution.Actual behavior
mounted network drives are not accessible anymore after a short time of idling and if you accidentially write to them you add a file to an empty folder which makes a remount impossible without clearing the folder.