Hi Matthieu
>>>>> "Matthieu" == Matthieu Imbert <[email protected]> writes:
Matthieu> However i noticed someting interresting: i have some client test
Matthieu> code that at some point calls a server function with as parameter
Matthieu> a list of structures of size 10000. This worked perfecly well
Matthieu> with the default server implementation, but it raises a socket
Matthieu> error exception when connecting to the twisted thrift server
Matthieu> implementation. The only difference in the client code is using
Matthieu> TFramedTransport instead of TBufferedTransport. If i reduce the
Matthieu> size of the list to 3000 items instead of 10000, it works well.
I think I know why you're seeing this. I ran into what sounds like the same
issue. In my case the problem was that the Twisted protocol has a
MAX_LENGTH var that is set to 99999 for some reason (see the
IntNStringReceiver class in twisted/protocols/basic.py), even for an
Int32StringReceiver.
I fixed it by subclassing TTwisted.ThriftClientProtocol and using a higher
limit:
class BeefyThriftClientProtocol(TTwisted.ThriftClientProtocol):
MAX_LENGTH = 10000000
class BeefyThriftServerProtocol(TTwisted.ThriftServerProtocol):
MAX_LENGTH = 10000000
Then have your factory use that protocol.
Terry