Using Akka http with a simple get returning a future from Slick DAO does only gives a timeout response 503 service unavailable when the future actually completes, whereas it should just give a 503 response after timeout expires.
Below is the configuration in application.conf
include "akka-http-version"
akka.http {
server {
idle-timeout = 300 s
request-timeout = 2 s
}
}
If, with above configuration a request comes and repository takes, let's say 10 seconds then the response only after 10 seconds is 503, whereas we should get a 503 after 2 seconds itself.