Skip to content

Expose set read limits for websocket server to prevent OOM#62

Merged
yzang2019 merged 2 commits intomainfrom
yzang/expose-SetReadLimits
Jul 25, 2025
Merged

Expose set read limits for websocket server to prevent OOM#62
yzang2019 merged 2 commits intomainfrom
yzang/expose-SetReadLimits

Conversation

@yzang2019
Copy link
Copy Markdown

@yzang2019 yzang2019 commented Jul 25, 2025

This PR will expose SetReadLimits for websocket server so that upstream client can use this method to set max message size to prevent OOM

Comment thread rpc/server.go
}

// SetReadLimits sets the limit for max message size to limit the request message size.
//
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: empty white line

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was just following the other conventions

Comment thread rpc/server.go Outdated
// SetReadLimits sets the limit for max message size to limit the request message size.
//
// This method would be useful to prevent the server from OOM when taking too large messages.
func (s *Server) SetReadLimits(maxMessageSize int64) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry I'm stupid where is this called?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh in sei-chain nvm

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, will be called in Sei-chain once this is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants