You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by GiriGG <gi...@gmail.com> on 2009/07/01 20:44:11 UTC
Solr Distributed Search throws
org.apache.solr.common.SolrException: Form_too_large Exception
Hi All,
I am trying to do a distributed search and getting the below error. Please
let me know if you know how to solve this issue.
18:20:28,200 ERROR [STDERR]
org.apache.solr.client.solrj.SolrServerException: Error executing query
18:20:28,200 ERROR [STDERR] at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:96)
18:20:28,200 ERROR [STDERR] at
org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:109)
...
18:20:28,202 ERROR [STDERR] Caused by: org.apache.solr.common.SolrException:
Form_too_large__javalangIllegalStateException_Form_too_large__at_orgmortbayjettyRequestextractParametersRequestjava1273__at_orgmortbayjettyRequestgetParameterMapRequestjava650__
at_orgapachesolrrequestServletSolrParamsinitServletSolrParamsjava29__at_orgapachesolrservletStandardRequestParserparseParamsAndFillStreamsSolrRequestParsersjava392__
at_orgapachesolrservletSolrRequestParsersparseSolrRequestParsersjava113__at_orgapachesolrservletSolrDispatchFilterdoFilterSolrDispatchFilterjava200__
at_orgmortbayjettyservletServletHandler$CachedChaindoFilterServletHandlerjava1089
__at_orgmortbayjettyservletServletHandlerhandleServletHandlerjava365__
at_orgmortbayjettysecuritySecurityHandlerhandleSecurityHandlerjava216__at_orgmortbayjettyservletSessionHandlerhandleSessionHandlerjava181__
at_orgmortbayjettyhandlerContextHandlerhandleContextHandlerjava712__at_orgmortbayjettywebappWebAppContexthandleWebAppContextjava405__
at_orgmortbayjettyhandlerContextHandlerCollectionhandleContextHandlerCollectionjava211__at_orgmortbayjettyhandlerHandlerCollectionhandleHandlerCollectionjava114__
at_orgmortbayjettyhandlerHandlerWrapperhandleHandlerWrapperjava139__at_orgmortbayjettyServerhandleServerjava285__at_orgmortbayjettyHttpConnectionhandleRequestHttpConnectionjava502__
at_orgmortbayjettyHttpConnection$RequestHandlercontentHttpConnectionjava835__at_orgmortbayjettyHttpParserparseNextHttpParserjava641__at_orgmortbayjettyHttpParserparseAvailableHttpParserjava202__
at_orgmortbayjettyHttpConnectionhandleHttpConnectionjava378__at_orgmortbayjettybioSocketConnector$ConnectionrunSocketConnectorjava226__at_orgmortbaythreadBoundedThreadPool$PoolThreadrunBoundedThreadPooljava442
___Form_too_large__javalangIllegalStateException_Form_too_large__at_orgmortbayjettyRequestextractParametersRequestjava1273__at_orgmortbayjettyRequestgetParameterMapRequestjava650__at_orgapachesolrrequestServletSolrParamsinitServletSolrParamsjava29__
at_orgapachesolrservletStandardRequestParserparseParamsAndFillStreamsSolrRequestParsersjava392__at_orgapachesolrservletSolrRequestParserspa
My code:
String SOLR_SHARD1 = "ap1.corp.org.com:8983/solr/";
String SOLR_SHARD2 = "ap2.corp.org.com:8983/solr/";
String SOLR_SHARDS = SOLR_SHARD1 + "," + SOLR_SHARD2;
QueryResponse response = null;
SolrServer solr = new
CommonsHttpSolrServer("http://ap1.corp.org.com:8983/solr/");
String queryStr ="...........";
SolrQuery query = new SolrQuery();
query.setQuery(queryStr);
response = solr.query(query);
SolrDocumentList docs = response.getResults();
long docNum = docs.getNumFound();
--
View this message in context: http://www.nabble.com/Solr-Distributed-Search-throws-org.apache.solr.common.SolrException%3A-Form_too_large-Exception-tp24295114p24295114.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr Distributed Search throws org.apache.solr.common.SolrException:
Form_too_large Exception
Posted by Mark Miller <ma...@gmail.com>.
Or if you must for some reason, you can raise the limit with the following
system property:
org.mortbay.http.HttpRequest.maxFormContentSize=500000
You could also do it in the servlet context, and I think there is even
a way in jetty.xml.
--
- Mark
http://www.lucidimagination.com
Re: Solr Distributed Search throws org.apache.solr.common.SolrException:
Form_too_large Exception
Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Thu, Jul 2, 2009 at 12:14 AM, GiriGG <gi...@gmail.com> wrote:
>
> Hi All,
>
> I am trying to do a distributed search and getting the below error. Please
> let me know if you know how to solve this issue.
>
> 18:20:28,202 ERROR [STDERR] Caused by:
> org.apache.solr.common.SolrException:
> *Form_too_large*
> __javalangIllegalStateException_Form_too_large__at_orgmortbayjettyRequestextractParametersRequestjava1273__at_orgmortbayjettyRequestgetParameterMapRequestjava650__
>
> at_orgapachesolrrequestServletSolrParamsinitServletSolrParamsjava29__at_orgapachesolrservletStandardRequestParserparseParamsAndFillStreamsSolrRequestParsersjava392__
>
I guess your query string is too large (more than the limit for an HTTP GET
request). Use a http post request instead of get and it should work fine.
To do that, create your own HttpClient with method as POST and pass that
client to CommonsHttpSolrServer constructor.
--
Regards,
Shalin Shekhar Mangar.