On 6/14/2013 8:57 AM, Snubbel wrote:
Hello,
I am upgrading from Solr 4.0 to 4.3 and a Testcase that worked fine is
failing since.
I do commit 10000 Documents to Solr, then reload them and add a value to a
multi-valued field with Atomic Update.
I do commit every 50 Documents, so it's not so many at once, because the
multi-valued field contains many values already.
And at some point, I get this exception:
java.net.SocketException: No buffer space available(maximum connections
reached?): connect
Looks like a client-side problem, either not enough java heap or you are
running out of connections because you're using a lot of connections at
once. This is happening on the client side, not the server side. That
may be an indication that you are doing something not quite right, but
if you actually do intend to create a lot of connections and you are
using HttpSolrServer, use code similar to this to bump up the max
connections:
ModifiableSolrParams params = new ModifiableSolrParams();
params.set(HttpClientUtil.PROP_MAX_CONNECTIONS, 1000);
params.set(HttpClientUtil.PROP_MAX_CONNECTIONS_PER_HOST, 200);
HttpClient client = HttpClientUtil.createClient(params);
String url = "http://localhost:8983/solr/collection1";
SolrServer server = new HttpSolrServer(url, client);
Thanks,
Shawn