Friday, March 07, 2014

Scalatra, Akka actors and default timeouts

This official Scalatra page claims that setting implicit val timeout = value seconds will set the time interval before the dreaded "Gateway Timeout" error to value seconds in your code. However, as of 2.2.2 this is NOT TRUE.

No matter what timeout is set to, Scalatra will kick out after 30 seconds - see why here.

In order to actually set the timeout to whatever value you need, add the code below to your Servlet

implicit val timeout:Timeout = 120 seconds
override implicit val asyncTimeout:Duration = 120 seconds

No comments: