You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Mario Emmenlauer (Jira)" <ji...@apache.org> on 2020/06/03 13:13:00 UTC
[jira] [Created] (THRIFT-5226) Problem with Buffered Transport for
.NET
Mario Emmenlauer created THRIFT-5226:
----------------------------------------
Summary: Problem with Buffered Transport for .NET
Key: THRIFT-5226
URL: https://issues.apache.org/jira/browse/THRIFT-5226
Project: Thrift
Issue Type: Bug
Components: netstd - Library
Affects Versions: 0.13.0
Reporter: Mario Emmenlauer
I'm testing various combinations of protocols and transports in C#. Without a transport layering, everything looks pretty good and I can use binary, compact and json protocols as expected. But when I wrap the transport in a buffered transport, it seems the buffer is running over-full after a while and I get the following error in the client:
{code}
Test method threw exception:
Thrift.Transport.TTransportException: MaxMessageSize reached
Stack Trace:
at Thrift.Transport.TEndpointTransport.CountConsumedMessageBytes(Int64 numBytes) in /home/user/Source/thrift/lib/netstd/Thrift/Transport/TEndpointTransport.cs:line 85
at Thrift.Transport.Client.TMemoryBufferTransport.ReadAsync(Byte[] buffer, Int32 offset, Int32 length, CancellationToken cancellationToken) in /home/user/Source/thrift/lib/netstd/Thrift/Transport/Client/TMemoryBufferTransport.cs:line 126
at Thrift.Transport.TBufferedTransport.ReadAsync(Byte[] buffer, Int32 offset, Int32 length, CancellationToken cancellationToken) in /home/user/Source/thrift/lib/netstd/Thrift/Transport/Layered/TBufferedTransport.cs:line 101
at Thrift.Transport.TTransport.ReadAllAsync(Byte[] buffer, Int32 offset, Int32 length, CancellationToken cancellationToken) in /home/user/Source/thrift/lib/netstd/Thrift/Transport/TTransport.cs:line 134
at Thrift.Protocol.TBinaryProtocol.ReadBinaryAsync(CancellationToken cancellationToken) in /home/user/Source/thrift/lib/netstd/Thrift/Protocol/TBinaryProtocol.cs:line 399
at DemoAPI.DemoAPI.fetchDataResult.ReadAsync(TProtocol iprot, CancellationToken cancellationToken) in /home/user/Source/ThriftTestManaged/src/gen-netstd/DemoAPI/DemoAPI.cs:line 2268
[...]
{code}
The maximum transferred data size should be ~16MB, whereas the default MaxMessageSize is larger than 100MB, so I assume the buffer should be big enough to hold the message. There is only a single client connected to the server, and the client is constantly polling data blocks from the server (just a simple benchmark with random byte[] blocks of sizes between 1 Byte and 16 MB).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)