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