lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rkuris <swcafe+nab...@gmail.com>
Subject RE: JdbcDataSource and threads
Date Sat, 24 Sep 2011 18:11:20 GMT
My guess on this is that you're making a LOT of database requests and have a
million TIME-WAIT connections, and your port range for local ports is
running out.

You should first confirm that's true by running netstat on the machine while
the load is running.  See if it gives a lot of output.

One way to solve this problem is to use a connection pool.  Look at adding a
pooled JNDI connection into your web service and connect with that instead.

The best way is to avoid making the extra connections.  If the data in the
subqueries is really short, look into caching the results using a
CachedSqlEntityProcessor instead.  I wasn't able to use this approach
because I had a lot of data in the inner queries.  What I ended out doing
was writing my own OrderedSqlEntityProcessor which correlates an outer
ordered query with an inner ordered query.  This ran a lot faster and
reduced my load times from 20 hours to 20 minutes.  Let me know if you're
interested in that code.

--
View this message in context: http://lucene.472066.n3.nabble.com/JdbcDataSource-and-threads-tp3359874p3364831.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message