This appears similar to
https://groups.google.com/forum/#!topic/mapdb/PIfjkv8mDZMBut I'm not sure.
Caused by: java.io.IOException: Map failed
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:892)
at org.mapdb.Volume$MappedFileVol.makeNewBuffer(Volume.java:534)
... 38 more
Caused by: java.lang.OutOfMemoryError: Map failed
at sun.nio.ch.FileChannelImpl.map0(Native Method)
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:889)
... 39 more
Java HotSpot(TM) 64-Bit Server VM warning: Attempt to deallocate stack guard pages failed.
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f13dd8ec000, 12288, 0) failed; error='Cannot allocate memory' (errno=12)
I am opening about 200 databases that total about 200GB of file space, on a server with much less RAM. It fails about half way through opening them. I am opening them in read-only mode, so hopefully they are not corrupted.
This is a little confusing, as I would expect the virtual memory to be 'free' on a 64 bit system. I have not accessed it, at this point I am only opening the databases and asking for what objects are in there.
There is some information here
http://javarevisited.blogspot.com/2014/11/javaioioexception-map-failed-javalangoutofmemoryerror.html but that seems more related to 32 bit systems.
This one is more promising :
https://blog.kumina.nl/2011/04/cassandra-java-io-ioerror-java-io-ioexception-map-failed/ -- I'll report back if this fixes it, that would be relatively pleasant.
What other tips are there? Is this expected to work? I'm working with datasets regularly close to 10x the RAM on the machine, and memory mapped files should really help out the performance in this situation. Or so I have hoped.