Skip to content

Commit

Permalink
Implement workaround for too many open files
Browse files Browse the repository at this point in the history
  • Loading branch information
quambene committed Aug 30, 2023
1 parent 2b2bfe1 commit a335156
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ impl Client {
let request_throttling = config.settings.request_throttling;
let client = ReqwestClient::builder()
.timeout(Duration::from_millis(request_timeout))
// Workaround for "Too many open files" (see <https://github.com/hyperium/hyper/issues/2312>).
.pool_idle_timeout(Duration::from_millis(0))
// Workaround for "Too many open files" (see <https://github.com/hyperium/hyper/issues/2312>).
.pool_max_idle_per_host(0)
.build()?;
let throttler = Some(Throttler::new(request_throttling));
Ok(Self { client, throttler })
Expand Down

0 comments on commit a335156

Please sign in to comment.