OOM cause by com.refinitiv.ema.access.OmmConsumerImpl Ojbect costing large memory

Hi we met OutOfMemory issue in our service. we are using dependency below :


<dependency> <groupId>com.refinitiv.eta</groupId> <artifactId>eta</artifactId>            <version>3.7.0.0</version> </dependency> <dependency> <groupId>com.refinitiv.ema</groupId> <artifactId>ema</artifactId>            <version>3.7.0.0</version> </dependency>

we deployed service on our server. posting message to trep (about 950 rics post every 5 mins).

after around 8 days. OOM issue occur.

we have export the heapdump file and did some analysis.

we found that most memory used by a OmmConsumerImpl object.

1695632850006.png

1695632744532.png

we are using OmmConsumer.submit to post message. each post event we will create new OmmConsumer and release it after all AckId return backed.

would you help to give some advice. thanks!

Best Answer

  • Hi @denny.w.h.zhong,

    I have not experienced this issue. My first guess would be that Spring Framework is not releasing the reference to the old objects. It should be fairly easy to try a barebone EMA example application to post your instruments and compare the heap memory.

    Please let us know your findings.

Answers

  • hi Gurpreet, we have the example application and developed as the example application.

    we post message like below:

    1. PostMsg postMsg = EmaFactory.createPostMsg();
    2. UpdateMsg nestedUpdateMsg = EmaFactory.createUpdateMsg();
    3. FieldList fieldList = fieldListMap.get(ric).getKey();
    4. StringBuilder fieldListStringBuilder = fieldListMap.get(ric).getValue();
    5. nestedUpdateMsg.payload(fieldList);
    6. long currentPostId = postId.incrementAndGet();
    7. try {
    8. consumer
    9. .submit(
    10. postMsg
    11. .postId(currentPostId)
    12. .serviceName(serviceName)
    13. .name(ric)
    14. .solicitAck(true)
    15. .complete(true)
    16. .payload(nestedUpdateMsg)
    17. , loginHandle
    18. );


  • Hi @denny.w.h.zhong,

    Your coding steps are correct.

    What I am recommending is that you try to run your application outside of any server or container environment without the use of any framework like Spring etc. This will help to investigate why the OMM objects are not being released into the heap.

    You also mentioned creating a new OMMConsumer - are you uninitializing the old ones? You can also continue to publish multiple update posts using the same old consumer as well.