On 8/9/2020 2:46 AM, Srinivas Kashyap wrote:
We are using HttpSolrClient(solr-solrj-8.4.1.jar) in our app along with 
required jar(httpClient-4.5.6.jar). Before that we upgraded these jars from 
(solr-solrj-5.2.1.jar) and (httpClient-4.4.1.jar).

After we upgraded, we are seeing lot of below connection evictor statements in 
log file.

DEBUG USER_ID - STEP 2020-08-09 13:59:33,085 [Connection evictor] - Closing 
expired connections
DEBUG USER_ID - STEP 2020-08-09 13:59:33,085 [Connection evictor] - Closing 
connections idle longer than 50000 MILLISECONDS

These logs are coming from the HttpClient library, not from SolrJ. Those actions appear to be part of HttpClient's normal operation.

It is entirely possible that the older version of the HttpClient library doesn't create these debug-level log entries. That library is managed by a separate project under the Apache umbrella -- we here at the Solr project are not involved with it.

The solution here is to change your logging level. You can either change the level of the main logger to something like INFO or WARN, or you can reduce the logging level of the HttpClient classes without touching the rest. I do not know what logging system you are using. If you need help with how to configure it, the people who made the logging system are much better equipped to configure it than we are.

I personally would change the default logging level for the whole program. Those messages are logged at the DEBUG level. Running an application with all loggers set that low should only be done when debugging a problem ... that level is usually far too verbose for a production system. I do not recommend it at all.

If you choose to only change the level of the HttpClient classes, those loggers all start with "org.apache.http" which you will need for your logging configuration.

An additional note: Your code should *not* create and close the HttpSolrClient for every query as you have done. The HttpSolrClient object should be created once and re-used for the life of the program.

Thanks,
Shawn

Reply via email to