![](https://secure.gravatar.com/avatar/cba23dc9be053c3fe2a262fac1ee139c.jpg?s=120&d=mm&r=g)
Folks, I have a server program which basically use a protocol.Protocol class to send a continuous byte stream to clients on TCP connections. However, I found , for whatever reason, if a client hung up and failed to remove the data from its receiving socket buffer, then the memory usage of the server program will go up endlessly. I think it is because the TCP sendQ buffer of the svr was building up as a result of the other side does not remove the data from its recvQ buffer (this guess was verified by the output of the netstat command), which in turn results the twisted Protocol to buffer the data submitted by upper layer via transport.write() to its internal buffer. My questions is that whether there is any mechanism in Twisted which can be used to set the maximum buffering size of the Protocol; and whenever if this cap is reached, I can be informed to give a chance to know the client is experiencing problem Regards. Weikai Xie