java.io.IOException: listener timeout after waiting for [90000] ms

Hello,
I've upgraded to version 6.8 and using java RestHighLevelClient.
Cluster is behind SearchGuard plugin and usually everything is working well.
Sometimes (I assume when there are some network issues) i'm getting errors java.io.IOException: listener timeout after waiting for [90000] ms even tho i set timeout of 3 seconds:

    SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
    searchSourceBuilder.size(0);
    searchSourceBuilder.timeout(TimeValue.timeValueSeconds(3));

    SearchRequest searchRequest = new SearchRequest(indexName);
    searchRequest.types("_doc");
    searchRequest.searchType(SearchType.QUERY_THEN_FETCH);
    searchRequest.source(searchSourceBuilder);

    SearchResponse response = client().search(searchRequest, RequestOptions.DEFAULT);

Due to the 90000ms timeout, all threads become busy, and app is chocking.
So I have few questions:

  1. why default listener timeout is set to 90000 ms? what is the reason for such high timeout? what should I consider if I want to lower it (lets say to 10000)?
  2. why its not throwing an exception after the 3 sec timeout i set in code above?
  3. how do you suggest to avoid such issues? will sniffer solve it?

Thanks!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.