What database are you using? Many of the JDBC drivers try to pull the entire resultset into RAM before feeding it to the application that requested the data. If it's MySQL, I can show you how to fix it. The batchSize parameter below tells it to stream the data rather than buffer it. With other databases, I don't know how to do this.

<dataConfig>
<dataSource type="JdbcDataSource"
              driver="com.mysql.jdbc.Driver"
              encoding="UTF-8"
url="jdbc:mysql://[SERVER]:3306/[SCHEMA]?zeroDateTimeBehavior=convertToNull"
              batchSize="-1"
              user="[REMOVED]"
              password="[REMOVED]"/>
<document>
<entity name="[TABLE]"
            query="select * from [TABLE] where (did mod 6) = 0">
</entity>
</document>
</dataConfig>

Shawn


On 3/8/2010 7:09 AM, Quan Nguyen Anh wrote:
Hi,
I have started using Solr. I had a problem when I insert a database with 2 million rows . I hav
The server encounters error: java.lang.OutOfMemoryError: Java heap space
I searched around  but can't find the solution.
Any hep regarding this will be appreciated.
Thanks in advance




Reply via email to