How to make sure Solr/Lucene won't die with java.lang.OutOfMemoryError?

前端 未结 8 675
失恋的感觉
失恋的感觉 2021-02-04 06:31

I\'m really puzzled why it keeps dying with java.lang.OutOfMemoryError during indexing even though it has a few GBs of memory.

Is there a fundamental reason why it needs

8条回答
  •  难免孤独
    2021-02-04 06:55

    I was using this Java:

    $ java -version
    java version "1.6.0"
    OpenJDK  Runtime Environment (build 1.6.0-b09)
    OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode)
    

    Which was running out of heap space, but then I upgraded to this Java:

    $ java -version
    java version "1.6.0_24"
    Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
    Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
    

    And now it works fine, on a huge dataset, with lots of term facets.

提交回复
热议问题