Hi, I am actually struggling with one of my custom search plugins is causing a SolrCore to keep many open searchers. This is causing my slave boxes to run out of disk space in couple of days.
Following is the problemm description : My solr set-up comprises a master, a repeater and two slaves. Slaves poll their respective masters every 10 secs.Searches are handled only by slave nodes while updates are done only to the master node. These are deployed on Jboss application servers on Linux boxes. The sorl version is 4.0. The problem we are facing is that the slave boxes run out of hard-disk space in couple of days which we are currently solving by restarting the slave nodes once every week. The reason for running out of hard-disk space is the Jboss holding reference to hundreds of deleted index files. Deleted file reference are alive because I see SolrCore having many open searchers. There should be maximum 2 open searchers at any time as per solrconfig.xml. [image: enter image description here] Another thing I have been able to establish that SolrCore holds the open searcher only when a query has been running and a replication cycle changes the registered searcher for the core while the last query hasn't finished yet. The searcher when the query began is held in memory by the SolrCore forever. This problem comes only when the query uses a SearchPlugin that we have written. In the search plugin we are closing the *SolrRequest* and *SolrCore* object. But still it doesn't seem to close the associated searcher. SolrCore portfolioIndexCore = container.getCore(portfolioCoreName); SolrIndexSearcher portfolioIndexSearcher = portfolioIndexCore.getSearcher().get(); When search is complete : finally { if (null != portfolioSolrReq) portfolioSolrReq.close(); if (null != portfolioIndexCore) { portfolioIndexCore.close(); } } I tried changing the above finally block to : finally { if (null != portfolioSolrReq) portfolioSolrReq.close(); if (null != portfolioIndexCore) { RefCounted<SolrIndexSearcher> searcher = portfolioIndexCore.getNewestSearcher(false); if (searcher.get() != portfolioIndexSearcher) { log.warn("Current Searcher for the Core " + portfolioIndexCore + " has changed. Old Searcher=[" + portfolioIndexSearcher + "], new Searcher=[" + searcher.get() + "]"); portfolioIndexSearcher.close(); portfolioIndexSearcher = null; } searcher.decref(); portfolioIndexCore.close(); } } But this also doesn't seem to help. -- Regards, Manish