Renato Haeberli created SOLR-18312:
--------------------------------------

             Summary: Thread-Pool Starvation in HttpJdkSolrClient for large 
Queries.
                 Key: SOLR-18312
                 URL: https://issues.apache.org/jira/browse/SOLR-18312
             Project: Solr
          Issue Type: Bug
            Reporter: Renato Haeberli


HttpJdkSolrClient uses the same thread-pool (default size of 4) for its 
HttpClient and also to write the response using RequestWriter.ContentWriter.

If HttpJdkSolrClient is used with 4 or more threads and a large query, roughly 
around the 1KB mark, all 4 threads from the pool become body-writers and no 
thread is left for theĀ  HttpClient to read, see attached thread-dump.
I belief under 1KB, the body is written in one go and the body-writer thread is 
freed up before anything is actually read. With larger bodies, the thread is 
held and the first 1 KB is flushed, but HttpClient has no thread to consume it.

This happens only with Http 1.1. and not with Http 2, as far as I understand 
this is due to a different mechanism Http 2 uses under the hood.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to