You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Alejandro Abdelnur (JIRA)" <ji...@apache.org> on 2013/10/22 19:24:42 UTC
[jira] [Created] (THRIFT-2235) TThreadPoolServer should have a NOP
reject policy
Alejandro Abdelnur created THRIFT-2235:
------------------------------------------
Summary: TThreadPoolServer should have a NOP reject policy
Key: THRIFT-2235
URL: https://issues.apache.org/jira/browse/THRIFT-2235
Project: Thrift
Issue Type: Bug
Components: Java - Library
Affects Versions: 0.9.1
Reporter: Alejandro Abdelnur
We are running into the issue described in THRIFT-692.
It is possible to reproduce this easily by having concurrent requests exceeding the number of maximum threads.
In this scenario, the threadpoolexecutor fails with an exception and the thrift server endpoint becomes unresponsive.
The ThreadPoolExecutor should set a discard rejection policy to avoid this issue.
{code}
executor.setRejectedExecutionHandler(new RejectedExecutionHandler() {
@Override
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
//LOG ERROR indicating that client request is being discarded.
}
});
{code}
Also, as suggested in THRIFT-692, using a bounded LinkedBlockingQueue instead the a SynchronousQueue would help to cope with spikes of requests beyond the max number of threads without failing users.
--
This message was sent by Atlassian JIRA
(v6.1#6144)