napoler / solr-php-client

Automatically exported from code.google.com/p/solr-php-client
Other
0 stars 0 forks source link

searching opens a new thread every time ? #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I've a java based indexer running in background. 
The typical "doc.addField("blah",content);
              server.add(doc);"

This is going in a continuous loop for 1,000,000 times.
While this is happening, if I run the example searcher which I got from here : 
http://code.google.com/p/solr-php-client/w/list, 

the indexer crashes saying so : 
"Error_opening_new_searcher_exceeded_limit_of_maxWarmingSearchers25_try_again_la
ter"

I even raised the number from 2 to 25 to test it... Just delayed the error, 
thats it...

If I don't run the searcher, the whole thing gets indexed fine... But if you 
run searcher continuously, it fails...

I am using solr 1.4 with the php client given here : 
http://code.google.com/p/solr-php-client/downloads/list

OS : windows 7 32 bit ultimate.
Java : 1.6.0_23

Original issue reported on code.google.com by shrinath...@gtempaccount.com on 28 Feb 2011 at 1:37

GoogleCodeExporter commented 9 years ago
BTW, if you guys need my indexer source code, see the attached : 

Original comment by shrinath...@gtempaccount.com on 28 Feb 2011 at 1:42

Attachments:

GoogleCodeExporter commented 9 years ago
When a solr index is committed, it forces all active searchers to be reopened 
so that they can see the changes. When a new search opens, there is a warming 
period (unless you turn it off in your solrconfig.xml) where it executes the 
warming query to get it's caches primed. I believe the default settings 
distributed with solr don't allow a warming searcher to be used for queries, so 
you're seeing it try to get a pre-warmed searcher but failing. There is a 
setting that allows a warming searcher to be used (<useColdSearcher> element in 
example config   - you could try using that. There are also settings to warm 
the first search different than the rest (e.g. don't run a warming query or run 
one that is faster). 

See 
http://wiki.apache.org/solr/SolrConfigXml#A.22Query.22_Related_Event_Listeners 
and the comments in the example solrconfig.xml 

Its also suggested to split read and writes across a master / slave setup. See 
http://wiki.apache.org/solr/SolrReplication

for other performance considerations see 
http://wiki.apache.org/solr/SolrPerformanceFactors

Since this issue seems more about Solr internals than the PHP client, I'd 
suggest consulting their user or developer mailing lists: 
http://lucene.apache.org/solr/mailing_lists.html

If you need help specifically with php solr client than try using our user 
mailing list: http://groups.google.com/group/php-solr-client . And try to 
reserve the issue list for true bug reports or feature requests. Thanks! Hope I 
was of help.

Original comment by donovan....@gmail.com on 28 Feb 2011 at 4:00