filecoin-project / lotus

Reference implementation of the Filecoin protocol, written in Go
https://lotus.filecoin.io/
Other
2.85k stars 1.27k forks source link

jsonrpc default queue seems too small #12534

Open ribasushi opened 1 month ago

ribasushi commented 1 month ago

Checklist

Lotus component

Lotus Version

All recent versions ( 1.29.1, master, etc )

Repro Steps

Run lotus chain export --recent-stateroots 1802 --skip-old-msgs /dev/null (done with calibnet for expedience)

/dev/null guarantees non-blocking instantaneous writes.

When the export is half-way done, observe tons of messages from the cli (not daemon) side:

...
2024-10-01T09:07:14.512Z        WARN    rpc     go-jsonrpc@v0.6.0/websocket.go:677      frame executor queue is backlogged      {"queued": 256, "cap": 256}
2024-10-01T09:07:14.535Z        WARN    rpc     go-jsonrpc@v0.6.0/websocket.go:677      frame executor queue is backlogged      {"queued": 256, "cap": 256}
2024-10-01T09:07:14.555Z        WARN    rpc     go-jsonrpc@v0.6.0/websocket.go:677      frame executor queue is backlogged      {"queued": 256, "cap": 256}
2024-10-01T09:07:14.573Z        WARN    rpc     go-jsonrpc@v0.6.0/websocket.go:677      frame executor queue is backlogged      {"queued": 256, "cap": 256}
2024-10-01T09:07:14.591Z        WARN    rpc     go-jsonrpc@v0.6.0/websocket.go:677      frame executor queue is backlogged      {"queued": 256, "cap": 256}
2024-10-01T09:07:14.609Z        WARN    rpc     go-jsonrpc@v0.6.0/websocket.go:677      frame executor queue is backlogged      {"queued": 256, "cap": 256}
2024-10-01T09:07:14.626Z        WARN    rpc     go-jsonrpc@v0.6.0/websocket.go:677      frame executor queue is backlogged      {"queued": 256, "cap": 256}
2024-10-01T09:07:14.644Z        WARN    rpc     go-jsonrpc@v0.6.0/websocket.go:677      frame executor queue is backlogged      {"queued": 256, "cap": 256}
2024-10-01T09:07:14.661Z        WARN    rpc     go-jsonrpc@v0.6.0/websocket.go:677      frame executor queue is backlogged      {"queued": 256, "cap": 256}
...

Describe the Bug

Current default settings of the jsonrpc emitter seem incompatible with chain exporting mode.

Logging Information

See `Repro Steps` above
ribasushi commented 1 month ago

cc @rvagg as having worked in this area quite recently in https://github.com/filecoin-project/lotus/issues/11920