lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ziqi Zhang <ziqi.zh...@sheffield.ac.uk>
Subject java.io.IOException: Map failed
Date Thu, 01 Oct 2015 19:25:30 GMT
Hi,

I have a problem which I think is the same as that described here:

http://stackoverflow.com/questions/8892143/error-when-opening-a-lucene-index-map-failed

However the solution does not apply in this case so I am providing more 
details and asking again.

The index is created using Solr 5.3

The line of code causing the exception is:
--------------------------------------------------------
     IndexReader indexReader = 
DirectoryReader.open(FSDirectory.open(Paths.get("the_path")));


The exception stacktrace is:
------------------------------------------
     Exception in thread "main" java.io.IOException: Map failed: 
MMapIndexInput(path="/mnt/fastdata/ac1zz/JATE/solr-5.3.0/server/solr/jate/data_aclrd/index/_5t.tvd")

[this may be caused by lack of enough unfragmented virtual address space 
or too restrictive virtual memory limits enforced by the operating 
system, preventing us to map a chunk of 434505698 bytes. Please review 
'ulimit -v', 'ulimit -m' (both should return 'unlimited'), and 'sysctl 
vm.max_map_count'. More information: 
http://blog.thetaphi.de/2012/07/use-lucenes-mmapdirectory-on-64bit.html]
     at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:907)
     at org.apache.lucene.store.MMapDirectory.map(MMapDirectory.java:265)
     at 
org.apache.lucene.store.MMapDirectory.openInput(MMapDirectory.java:239)
     at 
org.apache.lucene.codecs.compressing.CompressingTermVectorsReader.<init>(CompressingTermVectorsReader.java:144)
     at 
org.apache.lucene.codecs.compressing.CompressingTermVectorsFormat.vectorsReader(CompressingTermVectorsFormat.java:91)
     at 
org.apache.lucene.index.SegmentCoreReaders.<init>(SegmentCoreReaders.java:120)
     at org.apache.lucene.index.SegmentReader.<init>(SegmentReader.java:65)
     at 
org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:58)
     at 
org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:50)
     at 
org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:731)
     at 
org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:50)
     at 
org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:63)
     at uk.ac.shef.dcs.jate.app.AppATTF.extract(AppATTF.java:39)
     at uk.ac.shef.dcs.jate.app.AppATTF.main(AppATTF.java:33)


The suggested solutions as in the exception message do not work in this 
case because I am running the application on a server and I do not have 
permissions to change those.

Namely,
-----------
     ulimit -v unlimited

prints: "-bash: ulimit: virtual memory: cannot modify limit: Operation 
not permitted"

and
-----
     sysctl -w vm.max_map_count=10000000

gives:"error: permission denied on key 'vm.max_map_count'"


Is there any other way I can solve this?

Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message