EMA Batch snapsoot with potential memmory leak

image

Hi,

this is my code :

instrumentsInQuestion.forEach(instrument -> arrayI.add(EmaFactory.createOmmArrayEntry().codeState().ascii(instrument.getRootSymbol())));
arrayView.add(EmaFactory.createOmmArrayEntry().intValue(1));
batchView.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, arrayI));
batchView.add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_VIEW_TYPE, 1));
batchView.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_VIEW_DATA, arrayView));

ReqMsg reqMsg = EmaFactory.createReqMsg();

reqMsg.serviceName(serviceName).payload(batchView).interestAfterRefresh(false).initialImage(true);

consumer.registerClient(reqMsg, appClient);

....

i collect the handleids and unregister the instruments from

instrumentsInQuestion.forEach(instrumentInQuestion -> {

try {

CompletableFuture.supplyAsync(() -> {

try {

if (instrumentInQuestion.getHandleId() != null)
consumer.unregister(instrumentInQuestion.getHandleId());
else
log.info("Could not get handlerid for "+instrumentInQuestion.getRootSymbol());
} catch (Exception e) {

e.printStackTrace();
}
return true;
}).get(20, TimeUnit.SECONDS);
} catch (InterruptedException | ExecutionException | TimeoutException e) {

log.severe("Error unregistering " + instrumentInQuestion.getRootSymbol());
}
});

i have attached the heat dump, screen shoot.

My question is what am i doing wrong and I have 1.6GB of memory wasted?

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    Update:
    The Elektron API support team has asked the client perform
    a GC and do heap dump at the end of processing of every batch to see if the
    memory consumption continues to grow.

    They has analysis the head dump files and found that

    the
    numbers of WIRequest objects remain constant at 605 instances in all heap dump
    files. This evidence indicates that it is an expected behavior, not a memory
    leak.

    image

    image

Answers

  • ok @zoya.farberov, yes i added a support request on TRDC [service req no 05837804], just now , but i feel that the answer to something like that would be beneficial to all users

  • Due to an outage of the Thomson Reuters Developer
    Community email notification system from 2:30 PM CDT on November 29th until
    9:00 AM CDT on November 30th we are posting to all questions updated during
    this timeframe in order to ensure all customers receive all relevant email
    updates. Please review this question, and its associated answers, in order to
    ensure you are aware of any possible updates that may have occurred during this
    outage. We apologize for the delay and any inconvenience this has caused.

    Matthew Logterman, J.D.

    Sr. Product Manager, Thomson Reuters Developer Community

  • The well-being of any country depends on the efficiency of enterprises, organizations, institutions, entrepreneurs, and the well-being of each household. The state receives its income by taxing legal entities and individuals with both direct and indirect taxes. Investments should be considered as a factor of economic growth of the state, strengthening the infrastructure of the state, a factor on the example of an order thesis paper which is the development of a particular industry.