-
Notifications
You must be signed in to change notification settings - Fork 295
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
websocket: read limit exceeded #2955
Comments
Are you able to tell which RPC it is on the wallet side? @jrick Looks like wallet is likely sending a message that exceeds 16MiB which it shouldn't be. |
Sorry, I don't know which RPC call it is, but I can be sure that it happens in the dcrwallet startup phase, and the CPU usage is 100%. At this time dcrwallet has not received external rpc request |
If you run |
Thanks for your help, here is the log
|
Thanks for posting. It looks like it's on This is going to require some digging by the wallet devs to figure out why it's sending messages over the limit for a proper fix. However, in the mean time, if you're able to build from source on the diff --git a/internal/rpcserver/rpcwebsocket.go b/internal/rpcserver/rpcwebsocket.go
index 121e34ea..277632be 100644
--- a/internal/rpcserver/rpcwebsocket.go
+++ b/internal/rpcserver/rpcwebsocket.go
@@ -48,7 +48,7 @@ const (
// websocketReadLimitAuthenticated is the maximum number of bytes allowed
// for an authenticated JSON-RPC message read from a websocket client.
- websocketReadLimitAuthenticated = 1 << 24 // 16 MiB
+ websocketReadLimitAuthenticated = 1 << 26 // 64 MiB
// websocketPongTimeout is the maximum amount of time attempts to respond to
// websocket ping messages with a pong will wait before giving up. |
Thank you very much. |
Thank you very much, it seems to be working fine
|
Great, thanks for confirming. I'm glad the workaround is working for now. I'll leave this open until the wallet devs are able to address it properly. |
Are you by chance running a very large --gaplimit option in dcrwallet? and if so, why? |
Yes, what we are doing is a wallet service, we do not implement address management ourselves, but use the node's wallet service. In order to distinguish the attribution of transactions, we assign each user an address |
OK.. well just so are aware, even with a large gap limit, there is still the possibility that none of the addresses will be used and eventually wraparround will occur after returning too many addresses. The proper solution would be to generate address while ignoring the gap limit (use Large gap limits are only really useful when restoring a wallet, or if you must keep a watching wallet up to date with another wallet that runs with a custom gap. |
After upgrading to 1.7.2+release.
dcrwallet cannot provide services normally, and the rpc call always return
After checking, it was found that the websocket connection between dcrwallet and dcrd was disconnected due to an error.
I checked all startup parameters and there is nowhere to fix it.
It may not be caused by the upgrade, but may be caused by the restart. After startup, dcrwallet will scan the transaction. dcrwallet currently manages around 60k addresses.
The text was updated successfully, but these errors were encountered: