I am reading a file from S3 using alpakka s3 client
import akka.stream.alpakka.s3.scaladsl.S3
S3.download(bckt, bcktKey).flatMapConcat{
case Some((file, _)) =>
Foo
}.mapAsync(1){ f=>
Future{ Thread.sleep(1000)
}.recover{
e => e.printStackTrace}.to(Sink.ignore).run()
it crashes on
akka.stream.scaladsl.TcpIdleTimeoutException: TCP idle-timeout encountered on connection to [someBucket.s3.us-west-2.amazonaws.com:443], no bytes passed in the last 1 minute
It seems that the the source consumes the file fast and downstream the backpressure is consumed slowly and then the s3 connection closes and causes the stream to crash. Is there a way to tune S3 client timeout ?
update: I did tried to use throttle at the end of the source but without success, getting the same problem