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

Add configuration options to HTTP server #9765

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vtnerd
Copy link
Contributor

@vtnerd vtnerd commented Feb 1, 2025

No description provided.

@selsta
Copy link
Collaborator

selsta commented Feb 2, 2025

What would be a scenario where someone changes rpc-response-soft-limit?

@selsta
Copy link
Collaborator

selsta commented Feb 2, 2025

This seems to break multiple functional tests, not sure if it's the IP limit or the response size limit.

@iamamyth
Copy link

iamamyth commented Feb 2, 2025

The RPC client used in those tests does a poor job of connection management: Depending on the exact version of the requests library in use, it either opens and closes a new connection for every request (recent versions of the library), or re-uses a global, "default" session, which makes it tricky to clean up. I'd check the IP limit, and also, it might be appropriate to exempt local subnets.

Edit: Based on the trace and the build setup, I expect the connection per request behavior.

Comment on lines +3899 to +3903
const command_line::arg_descriptor<std::size_t> core_rpc_server::arg_rpc_response_soft_limit = {
"rpc-response-soft-limit"
, "Max response bytes that can be queued, enforced at next response attempt"
, 25 * 1024 * 1024
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a default 25MiB limit here that replaces the ABSTRACT_SERVER_SEND_QUE_MAX_BYTES_DEFAULT of 100MiB in any case. It's unclear what is ABSTRACT_SERVER_SEND_QUE_MAX_BYTES_DEFAULT. Is the default limit 25MiB or 100MiB ?

@@ -60,7 +61,8 @@ namespace epee
const std::string& bind_ipv6_address = "::", bool use_ipv6 = false, bool require_ipv4 = true,
std::vector<std::string> access_control_origins = std::vector<std::string>(),
boost::optional<net_utils::http::login> user = boost::none,
net_utils::ssl_options_t ssl_options = net_utils::ssl_support_t::e_ssl_support_autodetect)
net_utils::ssl_options_t ssl_options = net_utils::ssl_support_t::e_ssl_support_autodetect,
const std::size_t max_ip_connections = 3, const std::size_t response_soft_limit = 0)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure response_soft_limit should fallback to 0 if undefined ?

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

Successfully merging this pull request may close these issues.

4 participants