Hi,
I'm using Spray framework to handle some serious mathematical computation that takes some time to calculate. However, before my actor can generate any response, Spray's default timeout would kick in and return "The server was not able to produce a timely response to your request." It seems like Spray cuts off connection longer than "1000ms".
I actually already have timeout built into my route:
class FutureDemoService(futureDemoActor: ActorRef)(implicit system: ActorSystem)
extends Directives {
implicit val timeout = Timeout(45 seconds)
lazy val route = pathPrefix("future") {
path("data") {
get {
getFromFile(new File("views/js/data1.json"), `application/json`)
}
As you can see, no matter how I change this timeout value, it won't wait longer. How can I adjust Spray's default timeout event???
Sincerely,
Allen Nie