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 Michael Lackhoff <mi...@lackhoff.de> on 2008/01/23 12:18:45 UTC

Out of heap space with simple updates

I wanted to try to do the daily update with XML updates (was mentioned 
recently as the recommended way) but got an "OutOfMemoryError: Java heap 
space" after 319000 records.
I am sending one document at a time through the http update interface, 
so every request should be short enough to not run out of memory.
Do I have to commit after every few thousand records to avoid the error? 
My understanding was that I have to do a commit only at the very end. Or 
are there other things I could try?
How can I increase the heap size? I use the included jetty and start 
solr with "java -jar start.jar".
After I ran into the error a commit wasn't possible either.

What is the best way to avoid this sort of problems?

Thanks
-Michael


Re: Out of heap space with simple updates

Posted by Michael Lackhoff <mi...@lackhoff.de>.
On 23.01.2008 20:57 Chris Harris wrote:

> I'm using
> 
>     java -Xms512M -Xmx1500M -jar start.jar
> 

Thanks! I did see the -X... params in recent threads but didn't know 
where to place them -- not being a java guy at all ;-)

-Michael


Re: Out of heap space with simple updates

Posted by Chris Harris <ry...@gmail.com>.
I'm using

    java -Xms512M -Xmx1500M -jar start.jar

which gives the Java VM a min heap of 512MB RAM and a max of 1500MB. I
don't know if 1500MB is enough to fix your problem. I do know that
when I try to increase it much beyond there using the standard Sun VM
on Windows 2003 Server, Java refuses to start.

Chris

On Jan 23, 2008 3:18 AM, Michael Lackhoff <mi...@lackhoff.de> wrote:
> I wanted to try to do the daily update with XML updates (was mentioned
> recently as the recommended way) but got an "OutOfMemoryError: Java heap
> space" after 319000 records.
> I am sending one document at a time through the http update interface,
> so every request should be short enough to not run out of memory.
> Do I have to commit after every few thousand records to avoid the error?
> My understanding was that I have to do a commit only at the very end. Or
> are there other things I could try?
> How can I increase the heap size? I use the included jetty and start
> solr with "java -jar start.jar".
> After I ran into the error a commit wasn't possible either.
>
> What is the best way to avoid this sort of problems?
>
> Thanks
> -Michael
>
>