Skip to content
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

JSON-RPC queue is full too often #804

Closed
tomaka opened this issue Jun 23, 2023 · 2 comments · Fixed by #809
Closed

JSON-RPC queue is full too often #804

tomaka opened this issue Jun 23, 2023 · 2 comments · Fixed by #809

Comments

@tomaka
Copy link
Contributor

tomaka commented Jun 23, 2023

Problem introduced in #793

The Full error is meant to indicate that there are too many requests in fly. Right now after only 4 requests it's already full.

This bound should be equal to the max_requests_in_fly:

async_channel::bounded(config.serialized_requests_io_channel_size_hint.get());

Unfortunately, the underlying code does with_capacity(cap), so we can't set this to usize::max_value().

@tomaka
Copy link
Contributor Author

tomaka commented Jun 23, 2023

This bound should be equal to the max_requests_in_fly:

Actually no, I need to revisit the entire stack of APIs. There are several people who don't seem to care about back-pressure here, so we need to give them some guarantees of success for the sending.

@tomaka
Copy link
Contributor Author

tomaka commented Jun 23, 2023

Before #793, the behavior was indeed to simply check against max_requests_in_fly:

let failed_to_increase = client
.total_requests_in_fly

And yes, after some thought process it's the most sensical approach.

A client that doesn't want to care about this should simply set max_pending_requests to u32::max_value() when adding the chain.

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

Successfully merging a pull request may close this issue.

1 participant