Skip to content

maximum-frame-size and maximum-payload-bytes are unclear when OversizedPayloadException is thrown #4903

@andyfurnival

Description

@andyfurnival

When trying to track down why changes I was making had no effect, I think I may have spotted a configuration or message issue
I've looked in Master branch of Akka.net, but I'm using 1.4.18 when this exception is thrown
I'm running DotNet Core 3.1 on Linux

When I get this exception "Akka.Remote.OversizedPayloadException: Discarding oversized payload sent to..." is based on this line in Endpoint.cs

if (pdu.Length > Transport.MaximumPayloadBytes)

if (pdu.Length > Transport.MaximumPayloadBytes) { ... }

In HOCON I was using maximum-payload-bytes to change this, but I've noticed that this setting is only used in tests, and not in the Akka.Remote logic

When I followed this through, I found that MaximumPayloadBytes came from MaxFrameSize
public override long MaximumPayloadBytes => Settings.MaxFrameSize;

public override long MaximumPayloadBytes => Settings.MaxFrameSize;

TransportSettings
maxFrameSize: ToNullableInt(config.GetByteSize("maximum-frame-size", null)) ?? 128000

maxFrameSize: ToNullableInt(config.GetByteSize("maximum-frame-size", null)) ?? 128000,

and in HOCON it was remote.dot-netty.tcp.maximum-frame-size

The issue is maximum-payload-bytes seems to be only used for TestTransport, but the exception message leads you to this configuration, whereas maximum-frame-size is the right one for tuning based on that exception. I'm not sure if the Transport should be using maximum-frame-size or not, but I think it may help consolidate the configuration or make the error clearer

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions