For the past month, on the network at work, we have encountered “semaphore timeout period has expired” errors when copying some specific JavaScript files to a server (most files copy successfully without any issues).
The problem was first encountered when publishing a project from Visual Studio 2022 on a Windows 10 workstation to an internal web server. The same problem can be reproduced when using COPY from a command prompt, or ROBOCOPY from a command prompt, or doing a copy-and-paste operation between File Explorer windows. It can be reproduced from several different workstations, and copying to any of several different servers on the network. It can also be reproduced copying from one workstation to another workstation. It can be reproduced on multiple workstations (all running Windows 10) and multiple servers (running Windows Server 2012 or 2016). The machines are all up-to-date with Windows updates, network drivers, etc.
The problem is a failure to copy ONLY some specific files from a workstation to a server on the same work network.
This issue started on (or possibly a few days before) June 10th this year; the timing does not appear to be related to the installation of any Windows updates on the client machines. I have contacted the network, server, and security teams at work; they have all investigated, but nobody can find a reason for this error.
I have searched for similar issues (and searched for several of the error messages that have been logged in Event Viewer on clients and servers), both on StackOverflow and generally on the web, and read almost anything I could find. I haven’t yet found anything that has helped.
The error message displayed on the client is typically “the semaphore timeout period has expired” (after the copy operation has seemed to hang for a minute or two); although this message may just be a symptom of an underlying network issue or something blocking the file copy.
The error only occurs for JavaScript files, and only for a few specific JavaScript files; most JavaScript files copy successfully. The JS files that fail to copy (in my testing) are unmodified third-party (Bootstrap-related) files.
For the “.js” files that fail to copy, if I change the file extension to “.txt” (with no change to the content), then the copy of that file succeeds.
For the “.js” files that fail to copy, if I edit the content of that file (changing only comment sections in the file) and save it (with the same name and extension), then the copy of that file succeeds.
We have tested this while the security group temporarily disabled the anti-virus and the firewall on both the workstation and server used for the test; and the problem still occurs with any or all of these disabled.
I have also tried this with SMBDirect disabled, but that didn’t help either.
We captured Wireshark logs on both the client and server during one of these failed copy sessions, but analysis of the logs by someone on the network team didn’t provide any helpful clues.
When this error occurs, there are several SMB-related errors logged in the local Event Viewer logs on both the client and server machines.
The client logs a series of about 40-50 repeated errors and warnings as it seems to repeatedly attempt to reconnect, such as:
- DeviceLanmanRedirector: A request timed out because there was no response from the server. The server is responding over TCP but not over SMB.
- The connection was terminated due to one or more IO request timeouts. This indicates a problem with the underlying network or the storage stack on the remote server
The server only logs 2 events:
- Event 1017: Handle scavenged. The server closed a handle that was previously reserved for a client after 60 seconds.
- Event 1016: Reopen failed. The client attempted to reopen a continuously available handle, but the attempt failed. This typically indicates a problem with the network or underlying file being re-opened.
Does anyone have suggestions for articles I could read about this, or specific troubleshooting, or any network settings I should check, or anything else to investigate for this issue?