[2.0.1] Load Testing = Thrown(akka.pattern.AskTimeoutException: Timed out)

Showing 1-5 of 5 messages
[2.0.1] Load Testing = Thrown(akka.pattern.AskTimeoutException: Timed out) James Ward 6/14/12 9:48 AM
Hi all,

I'm doing some load testing of my Play 2 app and getting random errors:

Jun 14 08:57:49 hike-ubertracks app/web.1: [[31merror[0m] play - Cannot invoke the action, eventually got an error: Thrown(akka.pattern.AskTimeoutException: Timed out)

The app doesn't use Akka directly.  I can't find any other error information.  Any ideas on how to find what caused the error?

Thanks.

-James
Re: [2.0.1] Load Testing = Thrown(akka.pattern.AskTimeoutException: Timed out) Sebastian 6/14/12 10:34 AM
This happens, when play has to wait too long before getting the body parser or the Result (or Promise[Result]) of an action.

If an action needs heavy calculations, you should return a asynchronous Promise[Result] instead of calculating everything before returning from the action. Then play will wait for your result as long as you wish.

If for any reason you don't want to do this, you can increase the waiting time in application.conf. (at the moment I can't find the correct configuration key for it, but I know there is one).

Greetings,
Re: [play-framework] Re: [2.0.1] Load Testing = Thrown(akka.pattern.AskTimeoutException: Timed out) Guillaume Bort 6/14/12 11:06 AM
Or if the action are blocked in IO (and you can't use async feature because you are using a blocking API like JDBC), you should add more threads to the executor. 
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/9GlvhlpkmxIJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
Re: [play-framework] Re: [2.0.1] Load Testing = Thrown(akka.pattern.AskTimeoutException: Timed out) James Ward 6/14/12 11:08 AM
I bet that is what is happening since the page makes several JDBC
queries.  I should be using caching.  :)

How do I add more threads to the executor?  What is the default?

-James


On 06/14/2012 12:06 PM, Guillaume Bort wrote:
> Or if the action are blocked in IO (and you can't use async feature
> because you are using a blocking API like JDBC), you should add more
> threads to the executor.
>
> On 14 juin 2012, at 19:34, Sebastian <heinz...@googlemail.com
> <mailto:heinz...@googlemail.com>> wrote:
>
>> This happens, when play has to wait too long before getting the body
>> parser or the Result (or Promise[Result]) of an action.
>>
>> If an action needs heavy calculations, you should return a
>> asynchronous Promise[Result] instead of calculating everything before
>> returning from the action. Then play will wait for your result as long
>> as you wish.
>>
>> If for any reason you don't want to do this, you can increase the
>> waiting time in application.conf. (at the moment I can't find the
>> correct configuration key for it, but I know there is one).
>>
>> Greetings,
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "play-framework" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/play-framework/-/9GlvhlpkmxIJ.
>> To post to this group, send email to play-fr...@googlegroups.com
>> <mailto:play-fr...@googlegroups.com>.
>> To unsubscribe from this group, send email to
>> play-framewor...@googlegroups.com
>> <mailto:play-framework+unsubscribe@googlegroups.com>.
>> For more options, visit this group at
>> http://groups.google.com/group/play-framework?hl=en.
>
> --
> You received this message because you are subscribed to the Google
> Groups "play-framework" group.
Re: [play-framework] Re: [2.0.1] Load Testing = Thrown(akka.pattern.AskTimeoutException: Timed out) Guillaume Bort 6/14/12 11:22 AM
Check here:

http://www.playframework.org/documentation/2.0.1/AkkaCore

You need to change the parrallelism-factor of the Action dispatcher. Default is 1.0 meaning that it will use as many thread as available CPU. It is a very good default for fully async or CPU intensive applications, but very bad for the ones blocking in IO.