terrier:异常

问题一:

INFO - Processing /home/irlab/data/TREC-Blogs08/20080119/permalinks-1243.gz

java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
at gnu.trove.TObjectIntHashMap.rehash(TObjectIntHashMap.java:170)
at gnu.trove.THash.postInsertHook(THash.java:359)
at gnu.trove.TObjectIntHashMap.put(TObjectIntHashMap.java:155)
at org.terrier.utility.TermCodes.getCode(TermCodes.java:100)
at org.terrier.structures.indexing.DocumentPostingList.getTermId(DocumentPostingList.java:133)
at org.terrier.structures.indexing.DocumentPostingList$2.execute(DocumentPostingList.java:168)
at org.terrier.structures.indexing.DocumentPostingList$2.execute(DocumentPostingList.java:166)
at gnu.trove.TObjectIntHashMap.forEachEntry(TObjectIntHashMap.java:426)
at org.terrier.structures.indexing.DocumentPostingList.getPostings2(DocumentPostingList.java:165)
at org.terrier.indexing.BasicIndexer.indexDocument(BasicIndexer.java:368)
at org.terrier.indexing.BasicIndexer.createDirectIndex(BasicIndexer.java:261)
at org.terrier.indexing.Indexer.index(Indexer.java:344)
at org.terrier.applications.TRECIndexing.index(TRECIndexing.java:123)
at org.terrier.applications.TrecTerrier.run(TrecTerrier.java:390)
at org.terrier.applications.TrecTerrier.applyOptions(TrecTerrier.java:573)
at org.terrier.applications.TrecTerrier.main(TrecTerrier.java:237)
21877.18user 916.34system 6:01:37elapsed 105%CPU (0avgtext+0avgdata 0maxresident)k

45946520inputs+21416016outputs (1major+1978833minor)pagefaults 0swaps

解决方法:

I have increased the maximum Java Heap Space to 2GB, by setting TERRIER_HEAP_MEM to 2048M in bin/terrier-env.sh. It seems to be running smoothly now.


问题二:

java.lang.OutOfMemoryError: GC overhead limit exceeded解决

一、异常如下:
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded

二、解释:
JDK6新增错误类型。当GC为释放很小空间占用大量时间时抛出。
一般是因为堆太小。导致异常的原因:没有足够的内存。

三、解决方案:

1、查看系统是否有使用大内存的代码或死循环。
2、可以添加JVM的启动参数来限制使用内存:-XX:-UseGCOverheadLimit

set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx712m --XX:-UseGCOverheadLimit=1024m



问题三:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.


解决方法:

export _JAVA_OPTIONS=”-Xms20m -Xmx64m -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:NewSize=10m -XX:MaxNewSize=10m -XX:SurvivorRatio=6 -XX:TargetSurvivorRatio=80 -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled“



你可能感兴趣的:(terrier:异常)