java jira rest client timeout issue

I get `` when searching in jira. How can I increase the timeout ?


JiraRestClientFactory restClientFactory = new AsynchronousJiraRestClientFactory();
SearchResult results = null;

try {
URI uri = new URI(jira_url);
restClient = restClientFactory.createWithBasicHttpAuthentication(uri, jira_username, jira_password);
final SearchRestClient searchClient = restClient.getSearchClient();
String jql = searchClient.getFilter(jira_filterid).get().getJql();
// setting max result to 1000 and start with 0
results = searchClient.searchJql(jql, 500, 0).claim();
System.out.println("Took: " + stopWatch.toString() + " to find " + results.getTotal() + " case in jira filter with id " + jira_filterid);
} catch (Exception e) {
return results;

The searching should not take so long, i think it is when doing claim().


at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClient$3.apply(
at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClient$3.apply(
at com.atlassian.util.concurrent.Promises$Of$2.apply(
at com.atlassian.util.concurrent.Promises$Of$2.apply(
at com.atlassian.util.concurrent.Promises$2.onFailure(
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$1$
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable$
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient.runInContext(
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
at java.util.concurrent.ThreadPoolExecutor$
Caused by:
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.timeout(
at org.apache.http.impl.nio.client.LoggingAsyncRequestExecutor.timeout(
at org.apache.http.impl.nio.DefaultHttpClientIODispatch.onTimeout(
at org.apache.http.impl.nio.DefaultHttpClientIODispatch.onTimeout(
at org.apache.http.impl.nio.reactor.AbstractIODispatch.timeout(
at org.apache.http.impl.nio.reactor.BaseIOReactor.sessionTimedOut(
at org.apache.http.impl.nio.reactor.AbstractIOReactor.timeoutCheck(
at org.apache.http.impl.nio.reactor.BaseIOReactor.validate(
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$
... 1 more

2 answers



Even i am getting same issue. Any solutions so far?

Thanks in advance.



Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

89 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you