Here's an error log:
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
thread 'arbiter:724dcce3-b3b3-4523-8b02-3b2e9fa035dd:actix-net-worker-62' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', src/libcore/result.rs:997:5
Here's my server setup:
let _ = server::new(move || {
App::with_state()
// Enable logger
.middleware(middleware::Logger::default())
.resource("/default", |r| HttpResponse::Ok)
})
.bind(&localhost_port)
.unwrap_or_else(|_| panic!("Can not bind to {}", &localhost_port))
.start();
I did look at another actix example which includes:
.shutdown_timeout(0) // <- Set shutdown timeout to 0 seconds (default 60s)
but don't think it fix the issue for me.
Locally it runs OK, but this errors shows up when I execute a binary on Ubuntu 16.04
.
Here's a related question: https://stackoverflow.com/a/14370767 that suggests to set a setting a send timeout with the SO_SNDTIMEO socket option
.