Hi Guys, I’m having a problem with the MMDirectory that I don’t understand and I’m wondering if any one else might have any insight. Our server runs many hundreds (soon to be thousands) of indexes simultaneously, some of which a smallish (1-4M) and others are largish (1-2G). We’re deploying on SUSE Enterprise using Java 1.7.
Here’s the full exception: java.io.IOException: Map failed at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:849) at org.apache.lucene.store.MMapDirectory$MMapIndexInput.<init>(MMapDirectory.java:271) at org.apache.lucene.store.MMapDirectory.openInput(MMapDirectory.java:221) at org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:345) at org.apache.lucene.index.CompoundFileWriter.copyFile(CompoundFileWriter.java:231) at org.apache.lucene.index.CompoundFileWriter.close(CompoundFileWriter.java:201) at org.apache.lucene.index.DocumentsWriter.flush(DocumentsWriter.java:604) at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3580) at org.apache.lucene.index.IndexWriter.prepareCommit(IndexWriter.java:3369) at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:3478) at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3460) at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3444) at com.triagewireless.h1s.session.data.index.LuceneIndex.write(LuceneIndex.java:182) at com.triagewireless.h1s.session.data.SessionDataLucene.write(SessionDataLucene.java:114) at com.triagewireless.h1s.session.data.PacketCollator$PersistenceTask.run(PacketCollator.java:111) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.OutOfMemoryError: Map failed at sun.nio.ch.FileChannelImpl.map0(Native Method) at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:846) During initial development I encountered this exception because my per-process virtual memory wan’t ‘unlimited’. Once I changed that setting to the “unlimited’ setting, this problem went away. Until now… I’ve checked the max_map_count setting and it’s good at: 65530 and I’ve checked the per-process map count using cat /proc/<pid>/maps | wc -l and that returned around 4k maps, well under the 65k limit. Does anyone have any ideas on what to check out next? I’m running out of things to try… Many, many thanks in advance! Blessings, Brian Call --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org