Add hard fileno (#366)
* increase the fileno limit This allows wstunnel to use fds>1024. Otherwise heavy use can easily run out of file descriptors on connection attempts. While there will still be a limit, it is significantly higher (~500 times on my system) which provides enough headroom for connections to be torn down and fds to be closed.
This commit is contained in:
parent
820cb2232a
commit
05043954af
3 changed files with 17 additions and 1 deletions
|
@ -19,7 +19,7 @@ use base64::Engine;
|
|||
use clap::Parser;
|
||||
use hyper::header::HOST;
|
||||
use hyper::http::{HeaderName, HeaderValue};
|
||||
use log::debug;
|
||||
use log::{debug, warn};
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
use std::collections::BTreeMap;
|
||||
use std::fmt::Debug;
|
||||
|
@ -727,6 +727,9 @@ async fn main() -> anyhow::Result<()> {
|
|||
} else {
|
||||
logger.init();
|
||||
};
|
||||
if let Err(err) = fdlimit::raise_fd_limit() {
|
||||
warn!("Failed to set soft filelimit to hard file limit: {}", err)
|
||||
}
|
||||
|
||||
match args.commands {
|
||||
Commands::Client(args) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue