本文介紹了打開 lucene 索引時(shí)出錯(cuò):映射失敗的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!
問(wèn)題描述
我嘗試使用 1、2、3、4 GB 內(nèi)存啟動(dòng)該進(jìn)程,但仍然出現(xiàn)相同的錯(cuò)誤.有小費(fèi)嗎?gc 日志顯示它正在運(yùn)行 GC,即使它有足夠的內(nèi)存.但可能這個(gè)錯(cuò)誤與使用 NIO 的內(nèi)存映射文件有關(guān).有人以前見(jiàn)過(guò)這樣的事情嗎?如果是這樣,您是如何解決的?
I have tried starting the process with 1,2,3,4 GB of memory but still get the same error. Any tips? The gc log shows that its running the GC even though it has enough memory. But probably this error has something to do with the memory mapped files using NIO. Anybody has seen anything like this before? And if so, how did you solve it?
$ java -d64 -server -Xmx15g -Xms15g -XX:+UseConcMarkSweepGC -verbose:gc -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/frank/heap.dmp -jar lukeall-3.5.0.jar
[Full GC 207648K->28758K(15660544K), 0.1105290 secs]
[Full GC 61479K->15416K(15660544K), 0.0654310 secs]
[Full GC 69950K->15418K(15660544K), 0.0717170 secs]
[Full GC 69952K->15418K(15660544K), 0.0661720 secs]
java.io.IOException: Map failed
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:849)
at org.apache.lucene.store.MMapDirectory$MMapIndexInput.<init>(MMapDirectory.java:265)
at org.apache.lucene.store.MMapDirectory.openInput(MMapDirectory.java:216)
at org.apache.lucene.index.SegmentCoreReaders.<init>(SegmentCoreReaders.java:89)
at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:115)
at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:93)
at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:113)
at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:83)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:754)
at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:75)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:462)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:377)
at org.getopt.luke.Luke.openIndex(Unknown Source)
at org.getopt.luke.Luke.openOk(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at thinlet.Thinlet.invokeImpl(Unknown Source)
at thinlet.Thinlet.invoke(Unknown Source)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
Caused by: java.lang.OutOfMemoryError: Map failed
at sun.nio.ch.FileChannelImpl.map0(Native Method)
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:846)
... 48 more
推薦答案
ulimit -v unlimited
問(wèn)題解決了!
這篇關(guān)于打開 lucene 索引時(shí)出錯(cuò):映射失敗的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!