max fd limit

This commit is contained in:
Bryan Stitt 2022-05-17 17:24:10 +00:00
parent 997d4fa5bb
commit dcfad0c1b5
3 changed files with 13 additions and 0 deletions

10
Cargo.lock generated
View File

@ -1387,6 +1387,15 @@ dependencies = [
"instant",
]
[[package]]
name = "fdlimit"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b"
dependencies = [
"libc",
]
[[package]]
name = "ff"
version = "0.11.1"
@ -4294,6 +4303,7 @@ dependencies = [
"dashmap",
"derive_more",
"ethers",
"fdlimit",
"flume",
"futures",
"governor",

View File

@ -13,6 +13,7 @@ console-subscriber = { version = "0.1.5", features = ["parking_lot"] }
dashmap = "5.3.3"
derive_more = "0.99.17"
ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["rustls", "ws"] }
fdlimit = "0.2.1"
flume = "0.10.12"
futures = { version = "0.3.21", features = ["thread-pool"] }
# TODO: governor has a "futures" and "futures-timer" feature. do we want those?

View File

@ -25,6 +25,8 @@ fn main() -> anyhow::Result<()> {
// TODO: if RUST_LOG isn't set, set it to "web3_proxy=debug" or something
console_subscriber::init();
fdlimit::raise_fd_limit();
let cli_config: CliConfig = argh::from_env();
info!("Loading rpc config @ {}", cli_config.rpc_config_path);