You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by Brock Noland <br...@cloudera.com> on 2014/10/07 01:44:36 UTC

Re: Review Request 26381: THRIFT-2046:The worktask can be timed out in TThreadPoolServer (Java) when the max# thrift thread is reached

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26381/#review55609
-----------------------------------------------------------



lib/java/src/org/apache/thrift/server/TThreadPoolServer.java
<https://reviews.apache.org/r/26381/#comment95971>

    Why are we catching OOM error? That is typically fatal. If we are catching because we are runnig out of threads, we probably have too many threads.



lib/java/src/org/apache/thrift/server/TThreadPoolServer.java
<https://reviews.apache.org/r/26381/#comment95972>

    We are losing the stack trace here. Please add the exception to the statement. I also think this should be at an error level.


- Brock Noland


On Oct. 6, 2014, 9:02 p.m., Chaoyu Tang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26381/
> -----------------------------------------------------------
> 
> (Updated Oct. 6, 2014, 9:02 p.m.)
> 
> 
> Review request for Thrift and Jake Farrell.
> 
> 
> Bugs: THRIFT-2046
>     https://issues.apache.org/jira/browse/THRIFT-2046
> 
> 
> Repository: Thrift
> 
> 
> Description
> -------
> 
> When the max# of thrift threads is reached, a new task (workprocess) will be rejected by ExecutorServeice and has to wait in an infinite loop until a thread is available. During that time, server stops accepting other new connections and hangs new clients. This patch introduces a timeout for a task to be queued to ExecutorService for execution, thus not hanging new connections.
> 
> 
> Diffs
> -----
> 
>   lib/java/src/org/apache/thrift/server/TThreadPoolServer.java 488d17fbbf92c14831962f6134853592b460d2e3 
> 
> Diff: https://reviews.apache.org/r/26381/diff/
> 
> 
> Testing
> -------
> 
> Tested with Hive using various cases for timeout, maxthreads and also binary exponential backoff.
> 
> 
> Thanks,
> 
> Chaoyu Tang
> 
>