Perforce Public Knowledge Base - "WSAECONNRESET" Error Description
Reset Search



"WSAECONNRESET" Error Description

« Go Back



What is a WSAECONNRESET error?


When there is a forced-close of a networking socket, Windows issues a "WSAECONNRESET" error. Regular occurrences of the error indicate possible network problems.

This error should not be confused with WSAECONNREFUSED where a port is blocked or a hostname is not set, nor WSAECONNABORT which is a more serious, harder-to-debug error caused by a connection which was halted by the local operating system after network packets were lost or a suitable acknowledgement signal (ACK) was not received.

An explanation from Microsoft's KB:

Connection reset by peer

An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket). This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were in progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET.

An explanation from RealVNC:

Connection reset by peer

"Connection reset be peer" generally suggests a network issue (not related to the VNC application itself), this could be due to either misconfigured or faulty network hardware.

"Connection reset by peer" specifically means that, as far as the application reporting the error is concerned, the other endpoint sent a TCP reset packet. Sometimes, both endpoints report this error, in which case something in the middle has sent reset packets to both ends. It's not possible for the endpoints to get any more information than this. That unfortunately means the VNC Viewer cannot tell what has caused the error.


The WSAECONNRESET error is a networking error passed to Perforce from the operating system, so checking the network outside of Perforce will help diagnose the issue:

  1. Run a ping command using larger packet sizes.

    This would be "ping -l" on Windows or "ping -s" on Unix.  Typical networks will handle a packet size of 1350.

    For example, the following command should always succeed when run from Windows:

    ping -l 1350 {ip address or domain name}
    But larger packet sizes may also be tried to determine if the network is near its limits:


    ping -l 56 {ip address or domain name}
    ping -l 120 {ip address or domain name}
    ping -l 248 {ip address or domain name}
    ping -l 504 {ip address or domain name}
    ping -l 1016 {ip address or domain name}
    ping -l 2040 {ip address or domain name}
    ping -l 4088 {ip address or domain name}
    ping -l 8184 {ip address or domain name}
    ping -l 16376 {ip address or domain name}
    ping -l 32760 {ip address or domain name}

    Note: The "-l" flag is written as "dash lowercase-L".

  2. Check to see if this error is seen when running ftp

    Use the ftp command to retrieve large files and a large number of files from the same server.  If you are using a proxy server, also ftp large files and a large number of files from the proxy server.  If a file transfer generates networking errors outside of Perforce then you can expect the networking errors to be seen within Perforce as well.

  3. Adjust the MTU of all devices

    The Maximum Transmission Unit (MTU) should be set to 1492 or as high as possible on all networking equipment and network interfaces.  See "Common Windows Server Network Errors" in the Perforce knowledge base for more details.

    Also check the Perforce log to see if WSAECONNRESET errors come from particular machines or from particular IP address subnets.  This combined with the tracert command can help isolate routers and/or machines that may need the MTU adjusted.

  4. Use Shared Networking in virtual machines

    Try shared networking (NAT) if you are using a virtual machine instead of using the host machine's physical Ethernet directly.
Related Links



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255