Skip to content

http-max-request-size is not applied to actor response body size #7674

Closed as not planned
@darraghjones

Description

@darraghjones

In what area(s)?

/area runtime

What version of Dapr?

1.13.1

Expected Behavior

An actor should be able to return a response body with a payload up to the size specified by the http-max-request-size argument.

Actual Behavior

An error occurs when an actor response body is > 4 MB irregardless of the value of the http-max-request-size argument.

Note that in my testing, the issue is only with an actor response body....not when sending a large request body.

Steps to Reproduce the Problem

To reproduce the problem, I've cloned the AspireWithDapr project and added an WeatherActor which returns ~ 8 MB of weather forecasts. I've also configured the normal API to also return 8 MB.

I've added the --dapr-http-max-request-size 16 parameter to the dapr sidecar, and I can see it is applied in the sidecar logs,

time="2024-04-03T20:23:06.1058837+01:00" level=info msg="Enabled max body size HTTP middleware with size 16 MB" app_id=web instance=DESKTOP-SE6C36R scope=dapr.runtime.http type=log ver=1.13.1

What I'm seeing is that both the service invocation and actor return an error when the --dapr-http-max-request-size is not specified.

However, when it is set to 16, the service invocation endpoint succeeds, but the actor endpoint returns this error:

time="2024-04-03T20:28:33.8753374+01:00" level=debug msg="{ERR_ACTOR_INVOKE_METHOD error invoke actor method: rpc error: code = ResourceExhausted desc = grpc: received message larger than max (7902254 vs. 4194304)}" app_id=web instance=DESKTOP-SE6C36R scope=dapr.runtime.http type=log ver=1.13.1

I also added a method to the actor to accept an array of weather forecasts, and it seems I can send more than 4 MB request to the actor. So the issue is only when returning a response.

Release Note

RELEASE NOTE:

http-max-request-size argument now applies to actor response body message size.

Metadata

Metadata

Labels

kind/bugSomething isn't workingstaleIssues and PRs without response

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions