Mapped Network Drives Disconnecting

Tom Wright 0 Reputation points
2025-06-02T13:36:16.1566667+00:00

I have an azure storage drive mapped on several computers. I am using it as a shared storage device between several users desktop, some Azure virtual desktops and some physical HPC devices.

  1. The users generate inputs for the physical HPC computers on their laptops, or the virtual desktops and move the inputs into the shared storage
  2. The HPC devices are running a simple queueing script that searches the shared storage for inputs, and if it finds an input for a job it copies the input files locally and runs them.
  3. The HPC devices then copies the output files to back to the shared storage for the user to process.

I start the script on the HPC devices and leave it running for days at a time. This has worked fine in the past but in the past week or two I have been having an issue with the HPC devices disconnecting from the mapped azure network drive after a certain period (I think 12 hours or so).

Is there anything in the recent windows update that has changed network drive settings and is there a way to reverse it?

Thanks

Community Center | Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Alex Burlachenko 10,255 Reputation points
    2025-06-02T15:34:27.4433333+00:00

    hey tom! thanks for posting this on q&a super helpful for others who might be hitting the same snag )) so, mapped drives dropping after ~12 hours? yes, sounds like u might be running into the dreaded "idle session timeout" thing. microsoft did tweak some network-related stuff in recent updates, and yeah, it can mess with persistent connections.

    first off, check if the hpc devices are running windows 10/11 or server. if it’s win10/11, the default idle timeout is 15 minutes for smb connections unless u tweak it. servers are more forgiving, but still azure files can be picky. u gotta edit the keepalive settings on the hpc machines. open up powershell (admin mode, obvs) and run

    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" -Name "KeepConn" -Value 65535 -Type DWord
    
    

    this tells windows to keep the connection alive way longer. microsoft’s docs back this up here. also, make sure the hpc machines aren’t sleeping or disconnecting due to power settings double-check the NIC power management and disable "allow the computer to turn off this device to save power" in device manager.

    if u’re using azure files with smb, u might wanna switch to storage sync agent for more reliability it’s less prone to random drops. microsoft quietly recommends it for long-term ops here.

    if the script is running for days, add a lil’ reconnect logic in the code like a try-catch that remaps the drive if it ghosts u. not ideal, but hey, windows gonna windows )))

    hope this sorts it, if not, hit me back

    Best regards,

    Alex

    and "yes" if you would follow me at Q&A - personaly thx.
    P.S. If my answer help to you, please Accept my answer
    PPS That is my Answer and not a Comment
    

    https://ctrlaltdel.blog/

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.