10

Currently, there is a 40 second delay when accessing an unavailable UNC network share on Windows 7.

Is there a method to reduce this delay to something less painful, like 20 seconds?

Or, is there some method to eliminate this delay altogether?

Contango
  • 1,150
  • 5
  • 15
  • 31
  • The original question was "How to reduce UNC network timeout under Windwos 7", and many of the answers below aimed at this answer. At the request of @djs, updated the question to allow the possibility of eliminating the root cause of the delay. – Contango Jun 09 '17 at 08:48

5 Answers5

5

I believe the underlying protocol for UNC shares is Server Message Block (SMB) (SMB2 in Win Vista and later). Take a look at the SESSTIMEOUT registry setting. It sounds related and defaults to 45 seconds,

Microsoft Support - SESSTIMEOUT Information

I'm having trouble reproducing this issue to test modifying this value. Can you add additional information about how to reproduce this problem? How do you make a UNC share unavailable? Remove the system from the network? I've tried an unknown host and an unknown share name, but both requests fail fairly quickly in Windows Explorer.

John McCarthy
  • 151
  • 1
  • 4
  • 1
    a) In my case "unavailable simply means" target computer of UNC path switched off b) timeout of 45s +/- could be (fits round about) c) SESSTIMEOUT is not in the registry and d) does not show any effect in my particular case when added – Horst Walter Sep 11 '12 at 22:06
1

The timeout is different depending on what version of Windows you are running.

http://blogs.msdn.com/b/openspecification/archive/2013/03/27/smb-2-x-and-smb-3-0-timeouts-in-windows.aspx

Many of the timeouts can be over-ridden via the registry.

Brian D.
  • 469
  • 3
  • 11
0

This works for me. I'm using Windows 10 and didn't test on Windows 7.
Add SessTimeout DWORD in regedit HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters.
The unit is second. I set it to 3 and it works well.
Remember to restart explorer.exe for applying the new setting.

0

Is this any good ? A shot in the dark but nonetheless: MS Support

Jonathan Ross
  • 2,183
  • 11
  • 14
  • 1
    Not quite. This page covers the "disconnection timeout" which is the time (usually 10 minutes) that it takes before unused network shares are disconnected. I'm looking for the timeout period that blocks explorer from responding when its trying to connect to a network share that does not exist. – Contango Apr 01 '11 at 08:54
-2

There are two ways to fix the problem with an unavailable UNC network share:

  • Eliminate the source of the unavailable UNC network share.
  • Improve the timeout on Windows so that the missing network share does not negatively effect performance.

The first method (eliminate the source of the unavailable UNC network share) is always going to be the most efficient, as it guarantees an extremely quick response time.

Thus, to fix this problem, I identified the source of the 30-second timeouts that were freezing my system: my NAS (Network Attached Storage) device.

Never buy a cheap Netgear Stora NAS. For about two months, your computer will freeze randomly for 30 seconds. This will inevitably result in you telling the problem to your mates, followed by uncontrollable sobbing into your beer with frustration.

Contango
  • 1,150
  • 5
  • 15
  • 31
  • 5
    You didn't address your second bullet point, which is the actual question. You cannot guarentee a share will always be available. The server could be temporarily unavailable for any number of reasons: it's rebooting, it's off, network issues... The gross timeout in Windows is insane for local fileshares, and intolerable because it's done single-threaded, blocking all response from the instance of explorer once it starts trying to connect. – djs Jul 13 '11 at 17:34
  • @djs I asked the original question - and I posted the answer that worked for me. I didn't address the second bullet point because that wasn't the best solution in my case. Why the vote down? – Contango Feb 28 '12 at 11:57
  • 3
    Did not realize you had answered your own question. The question is actually quite a good one, but you didn't answer it. There may not be an answer, but you can't guarantee a network (device) won't misbehave, so it's always possible that explorer will hang for a long time... – djs Mar 04 '12 at 09:33
  • You can also get a network location that is faulty by accidentally mis-typing an address - and you'll get a hang like that too. OR you enter an address that is normally just fine, but the machine is asleep or offline when you enter the location. Either way Explorer will hang. – bgmCoder Mar 13 '16 at 02:40
  • @djs When I asked the original question, I had no idea what the cause was. It was only later that I discovered it was a faulty device on the network that was hanging Windows. What do you want me to do - modify the original question or suit, or delete it and start another? – Contango Mar 21 '17 at 17:51
  • If you edit the answer I can remove the downvote – djs Jun 07 '17 at 04:02
  • Edited the question. I'm not sure if this is the right idea, as it makes the existing answers look a bit weird. Sometimes one should be careful what one asks for :) – Contango Jun 09 '17 at 08:47
  • I agree with @djs completely, this is not a valid answer to the question even if the question is your own. – Adambean Jul 27 '18 at 15:34