У меня дома есть сервер WDMyCloud с включенным FTP. У меня есть ежедневный скрипт, выполняющийся на удаленном сервере для резервного копирования моих файлов (изменений) с использованием FTP через WinSCP.

Я обнаружил, что он работает в течение нескольких недель, затем перестает работать, и удаленный сервер говорит:

reconnecttime   120
confirm         off  
Connecting to MY_IP ... 
Connection failed.  
Timeout detected. (control connection)  
Connection failed. 
No session.

Если я подключаюсь к домашнему серверу и перезагружаю его, он снова работает, еще пару недель.

Я не уверен, как это исправить, не перезапуская каждый раз, что не требуется.

Запуск netstat -s (если эта информация помогает):

Ip:
    322829131 total packets received
    0 forwarded
    0 incoming packets discarded
    322829030 incoming packets delivered
    167026857 requests sent out
    96 reassemblies required
    48 packets reassembled ok
Icmp:
    2350 ICMP messages received
    17 input ICMP message failed.
    ICMP input histogram:
        destination unreachable: 1301
        timeout in transit: 1047
        echo replies: 2
    96 ICMP messages sent
    0 ICMP messages failed
    ICMP output histogram:
        destination unreachable: 94
        echo request: 2
IcmpMsg:
        InType0: 2
        InType3: 1301
        InType11: 1047
        OutType3: 94
        OutType8: 2
Tcp:
    67589 active connections openings
    159886 passive connection openings
    63 failed connection attempts
    293 connection resets received
    1 connections established
    321065805 segments received
    166107987 segments send out
    1979 segments retransmited
    24 bad segments received.
    2912 resets sent
    InCsumErrors: 8
Udp:
    2442227 packets received
    53 packets to unknown port received.
    0 packet receive errors
    2047207 packets sent
    0 receive buffer errors
    0 send buffer errors
UdpLite:
TcpExt:
    50 resets received for embryonic SYN_RECV sockets
    172118 TCP sockets finished time wait in fast timer
    24199 delayed acks sent
    89 delayed acks further delayed because of locked socket
    Quick ack mode was activated 91042 times
    1 SYNs to LISTEN sockets dropped
    313414566 packet headers predicted
    726641 acknowledgments not containing data payload received
    2497736 predicted acknowledgments
    114 times recovered from packet loss by selective acknowledgements
    1 bad SACK blocks received
    18 congestion windows recovered without slow start by DSACK
    29 congestion windows recovered without slow start after partial ack
    TCPLostRetransmit: 37
    2 timeouts after SACK recovery
    1143 fast retransmits
    28 forward retransmits
    26 retransmits in slow start
    644 other TCP timeouts
    TCPLossProbes: 15900
    TCPLossProbeRecovery: 9699
    2 SACK retransmits failed
    117192 DSACKs sent for old packets
    805 DSACKs sent for out of order packets
    9358 DSACKs received
    1 DSACKs for out of order packets received
    935 connections reset due to unexpected data
    136 connections reset due to early user close
    10 connections aborted due to timeout
    TCPSACKDiscard: 1914
    TCPDSACKIgnoredNoUndo: 8347
    TCPSpuriousRTOs: 3
    TCPSackShifted: 2583
    TCPSackMerged: 910
    TCPSackShiftFallback: 392
    TCPDeferAcceptDrop: 842
    TCPRetransFail: 2
    TCPRcvCoalesce: 11249748
    TCPOFOQueue: 2822356
    TCPOFOMerge: 794
    TCPChallengeACK: 22
    TCPSYNChallenge: 17
    TCPSpuriousRtxHostQueues: 2
IpExt:
    InMcastPkts: 654357
    OutMcastPkts: 296216
    InBcastPkts: 47928
    OutBcastPkts: 9356
    InOctets: -1
    OutOctets: -1
    InMcastOctets: 192358861
    OutMcastOctets: 111838969
    InBcastOctets: 7136455
    OutBcastOctets: 1110318

0