question

Upvotes
Accepted
3 0 0 3

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 :

  
                
  1. <dependency>
  2. <groupId>com.refinitiv.eta</groupId>
  3. <artifactId>eta</artifactId>
  4.             <version>3.7.0.0</version>
  5. </dependency>
  6. <dependency>
  7. <groupId>com.refinitiv.ema</groupId>
  8. <artifactId>ema</artifactId>
  9.             <version>3.7.0.0</version>
  10. </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!

#technologyema-api#product
1695632744532.png (139.1 KiB)
1695632850006.png (115.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
Accepted
22.7k 59 14 21

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.

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
3 0 0 3

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. );


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.

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.

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.