quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.76k stars 380 forks source link

Connection time out while running custom benchmark #1326

Closed vsawant1989 closed 2 years ago

vsawant1989 commented 2 years ago

ERROR server: connection failed: timed out I am trying to send file of 20MB from one server to another using Quinn. However for few iterations above message is popping

To tackle this,i tried to modify max idle timeout and keep alive interval, still the same issue is repeating Below are details of server config


    let mut server_crypto = rustls::ServerConfig::builder()
        .with_safe_defaults()
        .with_no_client_auth()
        .with_single_cert(certs, key)?;
    server_crypto.alpn_protocols = common::ALPN_QUIC_HTTP.iter().map(|&x| x.into()).collect();
    if options.keylog {
        server_crypto.key_log = Arc::new(rustls::KeyLogFile::new());
    }

    let mut server_config = quinn::ServerConfig::with_crypto(Arc::new(server_crypto));
    server_config.concurrent_connections(200000);

    Arc::get_mut(&mut server_config.transport)
        .unwrap()
        .max_idle_timeout(Some(IdleTimeout::try_from(Duration::from_secs(120)).unwrap()))
        .max_concurrent_uni_streams(100000_u32.into())
        .keep_alive_interval(Some(Duration::from_secs(60)));
Ralith commented 2 years ago

Please share a minimal test case that reproduces the issue.