Exception in thread "Thread-X" java.io.IOException: Map failed
at net.openhft.chronicle.VanillaChronicle$AbstractVanillaExcerpt.index(VanillaChronicle.java:412)
at net.openhft.chronicle.VanillaChronicle$AbstractVanillaExcerpt.nextIndex(VanillaChronicle.java:426)
at net.openhft.chronicle.tools.WrappedExcerpt.nextIndex(WrappedExcerpt.java:63)
... 2 more
Caused by: java.io.IOException: Map failed
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:892)
at net.openhft.lang.io.VanillaMappedFile.map(VanillaMappedFile.java:86)
at net.openhft.lang.io.VanillaMappedFile.readWriteBytes(VanillaMappedFile.java:145)
at net.openhft.lang.io.VanillaMappedCache.put(VanillaMappedCache.java:84)
at net.openhft.chronicle.VanillaDataCache.dataFor(VanillaDataCache.java:70)
at net.openhft.chronicle.VanillaChronicle$AbstractVanillaExcerpt.index(VanillaChronicle.java:388)
... 4 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)
... 9 more
--
You received this message because you are subscribed to the Google Groups "Chronicle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-chronicl...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello Saurabh,
This happens when you create a new entry in a new thread each time. This is very inefficient. We suggest you use a small thread pool and reuse your threads or use indexed chronicle and hold a lock when writing.
We are planning a queue which won't have this issue however you will still want to control how your threads are created.
Regards,
Peter.