Skip to content

Configurable wsMessageSizeLimit for websocket RPC connections (websocket: read limit exceeded) #23754

@flyte

Description

@flyte

Rationale

Currently, messages are limited to a size of 15MB using a wsMessageSizeLimit = 15 * 1024 * 1024 constant.
It would be helpful if this would be configurable (as well as perhaps some of the other constants like timeouts).

I'm running my own geth node on one machine and querying it from another machine on the local network using the RPC client. I'm deliberately performing large queries on my node and the network transport isn't a bottleneck, so I'd like to configure my RPC client to accept much larger response sizes (it has no problem when using an IPC socket when running locally on the node) without returning an error:

websocket: read limit exceeded

I haven't tried the HTTP connection, but that has an even smaller limit of 5MB and is reportedly slower, which doesn't work for my case in which I'm making millions of calls to my node.

Implementation

As long as it's somehow configurable, I can't say what the best implementation would be (only been writing Go for a week or so).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions