-
Notifications
You must be signed in to change notification settings - Fork 236
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
High-Intensity JSON RPC BatchRequest Causes Server Crash and Unpredictable Downtime #4520
Comments
Hello, What are the total memory, available memory, and CPU configuration of this server?
Which RPC causes the entire server to crash?
Can you check the logs of the last crash? Can you find out why it crashed (most likely due to OOM)? You can use |
I think this PR may help to resolve this issue: it's on 117 version. |
we have another working in progress PR try to limit the resource spent on heavy RPC: |
The server's configuration is not critical. Previously, the server with lower specifications would crash when the batch size reached 1000. With the current server's improved specifications, it crashes when the batch size reaches 2000. The interface causing the crash is |
Thank you for your efforts, @chenyukang ! We're eagerly looking forward to the launch of this feature to optimize resource usage. Currently, I've already determined the batch size that our server can tolerate, and to avoid any further crashes, I won't be conducting related tests for now. However, I believe this improvement will have a positive impact on our system, and I'm looking forward to the resolution of this issue. |
rpc batch mode will execute all the requests concurrently and wait for them to complete and return together, notice that you are calling suggest to limit the batch size to a smaller number and use |
@Cupnfish Could you provide the output of |
|
@Cupnfish in the future release of ckb, you may also add this RPC configuration to limit the batch size of RPC request: |
Bug Report
Current Behavior
When subjected to high-intensity JSON RPC BatchRequest, the CKB node causes the entire server to crash, rendering it completely inaccessible. The crash occurs after a certain batch size threshold is exceeded, and even after stopping the requests, the server will still crash at an unpredictable time in the future.
Expected Behavior
I expect the node to send an error message to the client when it cannot handle high-intensity batch sizes, rather than attempting to process the requests and causing the server to crash. Ideally, the node should shut down to prevent affecting the entire server.
Environment
Additional context/Screenshots
The issue was first observed when my indexer node encountered the bug and stopped working. I had used high-frequency batch sizes for a few seconds before stopping the requests. Approximately two hours later, the server suddenly became unresponsive.
The text was updated successfully, but these errors were encountered: