-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] currently does not support client body read timeout #1054
Labels
Comments
Godwoken rpc is usually proxied by web3 / nginx etc., not exposed directly. But adding a client body size limit / timeout is pretty easy, so I will add it just in case. |
blckngm
added
enhancement
New feature or request
and removed
bug
Something isn't working
labels
Apr 21, 2023
@chenyukang Just use TimeoutLayer from tower-http, no need for |
Got it, thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From the code:
godwoken/crates/rpc-server/src/server.rs
Line 51 in 2d8ad35
Seems
godwoken
also has a similar issue withckb
, nervosnetwork/ckb#3880I didn't verify it on
godwoken
, but from the code therpc
does not has a limit for a request, you can verify it withcurl
:An possible fix is to add a
timeout
middleware: https://github.com/chenyukang/jsonrpc-utils/blob/810f6a36eec3ce5be8673c11311bf1dcc506c3f9/examples/server-timeout.rs#L39The text was updated successfully, but these errors were encountered: