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

Reduce ConnectionPool size used by send-transaction-service #33548

Merged
merged 2 commits into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion connection-cache/src/connection_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use {
const MAX_CONNECTIONS: usize = 1024;

/// Default connection pool size per remote address
pub const DEFAULT_CONNECTION_POOL_SIZE: usize = 4;
pub const DEFAULT_CONNECTION_POOL_SIZE: usize = 2;

#[derive(Clone, Copy, Eq, Hash, PartialEq)]
pub enum Protocol {
Expand Down Expand Up @@ -81,6 +81,7 @@ where
connection_config: C,
connection_manager: M,
) -> Self {
info!("Creating ConnectionCache {name}, pool size: {connection_pool_size}");
let (sender, receiver) = crossbeam_channel::unbounded();

let map = Arc::new(RwLock::new(IndexMap::with_capacity(MAX_CONNECTIONS)));
Expand Down