0

My scenario,

I have some transaction details in Mysql DB. I use WSO2 ESB server and push these data into WSO2 DAS server(persisted the data in H2 DB with primary key and index). The data are loaded to the DAS server successfully but the problem I face is, I see an ERROR in my DAS console continuously after every three seconds. The error is given below.

    [2016-04-21 09:09:48,175] ERROR {org.wso2.carbon.analytics.dataservice.core.indexing.AnalyticsDataIndexer} -  Error in p
rocessing index batch operations: Error in index data peekNext: Map failed
org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException: Error in index data peekNext: Map failed
        at org.wso2.carbon.analytics.dataservice.core.indexing.LocalIndexDataStore$LocalIndexDataQueue.peekNext(LocalInd
exDataStore.java:287)
        at org.wso2.carbon.analytics.dataservice.core.indexing.AnalyticsDataIndexer.processLocalShardDataQueue(Analytics
DataIndexer.java:297)
        at org.wso2.carbon.analytics.dataservice.core.indexing.AnalyticsDataIndexer.processIndexOperations(AnalyticsData
Indexer.java:261)
        at org.wso2.carbon.analytics.dataservice.core.indexing.AnalyticsDataIndexer.access$200(AnalyticsDataIndexer.java
:141)
        at org.wso2.carbon.analytics.dataservice.core.indexing.AnalyticsDataIndexer$IndexWorker.run(AnalyticsDataIndexer
.java:1865)
        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:745)
Caused by: java.io.IOException: Map failed
        at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:888)
        at com.leansoft.bigqueue.page.MappedPageFactoryImpl.acquirePage(MappedPageFactoryImpl.java:86)
        at com.leansoft.bigqueue.BigArrayImpl.append(BigArrayImpl.java:325)
        at com.leansoft.bigqueue.BigQueueImpl.enqueue(BigQueueImpl.java:92)
        at org.wso2.carbon.analytics.dataservice.core.indexing.LocalIndexDataStore$LocalIndexDataQueue.peekNext(LocalInd
exDataStore.java:271)
        ... 7 more
Caused by: java.lang.OutOfMemoryError: Map failed
        at sun.nio.ch.FileChannelImpl.map0(Native Method)
        at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:885)
        ... 11 more

I am not sure why this is happening. Please help and thanks in advance.

4

1 回答 1

1

This happens because you are using H2 which is a in memory database and uses memory mapped files. We don't recommended using H2 in production deployments.

This error usually comes while mapping a big file in memory e.g. trying to map a file greater than 1 or 2GB

You can also use -d64 and -XX:MaxDirectMemorySize JVM option to enable large direct buffers

于 2016-04-21T05:30:13.550 回答