# Network error messages (unexpectedly shrunk window)

## Oak

Hi guys.

Recently I've been having network problems while rtorrent is running, which I think has something to do with my firewall setup.

When rtorrent is running I randomly gets error messages (dmesg) that says:

```

TCP: Peer xxx:xxx:xxx:xxx:49917/9882 unexpectedly shrunk window 2225422736:2225424539 (repaired)

```

This immediately kills my connection for a couple of minutes.

It only happens when rtorrent is running. rtorrent is set to use ports 9881-9882 for inbound connections, and my shorewall rule for this is

```

ACCEPT  all             $FW             tcp     9881

ACCEPT  all             $FW             udp     9881

ACCEPT  all             $FW             tcp     9882

ACCEPT  all             $FW             udp     9882

```

I think that my ISP treats this as a problem/bug from bad packets, which probably is the reason why my connection dies.

Any suggestions on what to do or try to fix this?

----------

## papahuhn

It's not a problem with your ISP or your firewall rules. The other peer set the advertised window size to zero, meaning that it cannot or does not want to receive any more data by you. Perhaps the remote peer was overloaded or maybe the remote torrent-client has been set to pause (not stop) but did not close it's associated TCP connections.

----------

## Oak

Ok, I guess that rtorrent is the one to blame then.

Thanks!

----------

## papahuhn

 *Oak wrote:*   

> Ok, I guess that rtorrent is the one to blame then.

 

No, not your torrent client, but the remote peer.

----------

## Oak

Hmm, so one solution would be to block those peers?

----------

## papahuhn

I would ignore the messages.

----------

## Oak

Since my connection problems only occur when rtorrent is running, I think that it's safe to assume that rtorrent is causing them.

However, I can't be sure that the problems actually has anything to do with the error messages, since they might be independent of each other.

I just switched to ktorrent, which doesn't cause any connection problems and doesn't produce any error messages.

Thanks!

----------

## Bircoph

If you need to use good console torrent, try enhanced ctorrent.

I have no problems with it for several years, also this application is easy to chroot, thus you can greatly enhance its security.

----------

## Oak

 *Bircoph wrote:*   

> If you need to use good console torrent, try enhanced ctorrent.
> 
> I have no problems with it for several years, also this application is easy to chroot, thus you can greatly enhance its security.

 

Unfortunately, the trackers I use only allows a given set of clients. ctorrent isn't one of them.

Thanks anyway.

----------

