question

Upvotes
Accepted
1 1 1 1

EMA Batch snapsoot with potential memmory leak

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?

refinitiv-realtimeelektronelektron-sdkema-apirrtelektron-message-apiADSmemorymemory-leaks
heap.png (17.2 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
27.6k 67 18 14

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.


600-ob.jpg (225.6 KiB)
12600-ob.jpg (256.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 1 1 1

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 1 1 0

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 0 0

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.