Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • EMA /
avatar image
Question by nitsiosa · Sep 07, 2017 at 11:44 AM · ema javaADSmemoryleak

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?

heap.png (17.2 KiB)

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

3 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by wasin.waeosri · Nov 29, 2017 at 03:51 AM

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)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by nitsiosa · Sep 07, 2017 at 12:15 PM

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

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by Matthew.Logterman · Dec 01, 2017 at 11:49 AM

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

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
13 People are following this question.

Related Questions

EMA Java: "channel out of buffers errorId=-4" error with over 3,000 RICs

EMA OmmConsumer memory leak in Java API?

Invalid Message Syntax on EMA Java Posting Consumer

(JAVA) Does using interestAfterRefresh(false) remove the need for deregistering items with Elektron?

Unable to process batch greater than 4358 rics

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges