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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

800 views 2 19
Join discussion

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