On 9/3/23 04:28, Ing. Andrea Vettori wrote:
what can cause this issue ?

This times out

                 solrServer = new Http2SolrClient.Builder(solrUrl)
                         .withRequestTimeout(SOLR_TIMEOUT_MINUTES, 
TimeUnit.MINUTES)
                         .withConnectionTimeout(SOLR_TIMEOUT_MINUTES, 
TimeUnit.MINUTES)
                         .withIdleTimeout(SOLR_TIMEOUT_MINUTES, 
TimeUnit.MINUTES)
                         .build();

What is the value of SOLR_TIMEOUT_MINUTES? This may not be super relevant, but I am curious.

The connection timeout should be something between 5 and 15 seconds. TCP connections establish pretty quickly, even if the destination is in a tiny island country with nothing but satellite Internet. If you haven't gotten a connection established within 10-15 seconds, it's probably never going to connect. If this connection is on a LAN, 5 seconds would be an eternity.

I would suggest switching the timeouts to seconds and using more than one constant.

What is the precise error? A Java exception can be dozens of lines in length ... be sure to include all of it.

What is the Solr version on the server? Older Solr versions do not work well with http2. The workaround for those issues is to use http1.1.

Here's a bug that MIGHT be applicable, fixed in Solr 9.2.0:

https://issues.apache.org/jira/browse/SOLR-16099

The underlying issue is one or more bugs in Jetty. One of the MANY fixes in 9.2.0 was an upgraded Jetty version, both server and client.

If the server side is also 9.3.0, then http2 should work well, and I do not know what might be wrong. The exception with stacktrace might provide a clue.

Thanks,
Shawn

Reply via email to