question

Upvotes
Accepted
25 0 1 5

EMA OmmConsumer memory leak in C++ API?

We need to switch between hosts in case of unavailability. To do this, we recreate OmmConsumer with new settings (only one OmmConsumer exists at a time). If all hosts are unavailable, the memory leaks out exponentially during 30 attempts, which leads to the process crash. It is empirically established that the memory leak occurs as a result of repeated calls to the OmmConsumer constructor. Advise how to avoid this problem?

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apiconsumermemory
icon clock
10 |1500

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

Upvotes
Accepted
7.6k 15 6 9

This issue has been fixed in ESDK 1.4.0.L1.

icon clock
10 |1500

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

Upvotes
20.3k 73 10 20

Hi @dmitry.kozhevnikov

I am not aware of memory leak as you describe - please raise a Premium Support Ticket if you wish to investigate in more detail offline.

Before you do that, I just wanted to check if you aware of the ChannelSet functionality of EMA?

The use of ChannelSets allows you to specify a comma-separated list of channels names. Each Channel definition can point to a different host. Channels in the set will be tried by EMA with each reconnection attempt until a successful connection is made.

Please refer to section 3.1.4 of the EMA C++ Config Guide as well as this article on EMA Config for further details.

icon clock
10 |1500

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

Your Premium Support Ticket link doesn't work

Hi @dmitry.kozhevnikov

This would be the case if you are not a named user for your organisation or if your organisation does not have a RDC support membership.

You can check with your Market Data team or your Refinitiv account manager to find out if you do have a named member who can raise a Premium support ticket on your behalf.

In terms of the other Java post, it appears the user opened a Support ticket and closed the ticket after receiving guidance from the RDC team.

If your organisation does not have a Support membership, then you can report your issue on Github and it will be looked at as a best endeavours basis by the support team.

Also, did you try to use the ChannelSets as mentioned above - as this would is the recommended way i.e. letting EMA deal with connectivity issues and failover scenarios - rather than doing it at an application level.

I'm trying. And as far as I understand - the constructor of the consumer in any case will fail after the specified timeout. Which brings us back to the problem of recreating the consumer with further memory leaks and crash. Or if we set an infinite timeout - we have potential problems with stopping the service when all hosts are unavailable (since the constructor of the consumer will never end)

Upvotes
18 0 1 2

Hi Umer,

When I'm following your Premium Support Ticket link I'm getting

Something Went Wrong We were unable to retrieve the page you were trying to reach. We don't want to leave you hanging though. Go back or see other APIs you may be interested in...

Thanks.

icon clock
10 |1500

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

Upvotes
1 0 0 0

I do experience the memory leak as well.

Due to some reasons (not important why) I need to dispose (uninitialize) the OmmConsumer and create a new instance of OmmConsumer. However after roughly 27 iterations (destroy OmmConsumer and create new one) the process consumes 16 GB of memory and crashes. Worth mentioning that this happens even if no clients are registered.

The ChannelSet feature is not what I am looking for and it won't help me.

icon clock
10 |1500

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

Hi @Anton Marček

Thanks for sharing your experience. Please raise a Premium Support Ticket to investigate in more detail offline / raise a bug report.

Thanks.

Thank you for the suggestion however the premium support link you provided does not work for me. Could you please guide me how to reach the form via the webpage's GUI?

Upvote
7.6k 15 6 9

This issue has been reported on GitHub
https://github.com/Refinitiv/Elektron-SDK/issues/118
JIRA ID: ESDK-3495

Based on the latest post from the issue, the development team is working on this issue, and it will be fixed in the next release.

You can change EMA default behavior to log the EMA messages to Stdout as the workaround. We can put EmaConfig.xml to a running directory and then change LoggerType in configuration file to Stdout instead.


DefaultConsumer in the XML file is Consumer_1 and it use Logger_1 therefore we need to change LoggerType in Logger_1 section to LoggerType::Stdout.


<DefaultConsumer value="Consumer_1"/>

<ConsumerList>

<Consumer>

<Name value="Consumer_1"/>

<Channel value="Channel_1"/>

<Logger value="Logger_1"/>


<Dictionary value="Dictionary_1"/>


</Consumer>

<Logger>

<Name value="Logger_1"/>

<LoggerType value="LoggerType::Stdout"/>

<LoggerSeverity value="LoggerSeverity:: NoLogMsg"/>

</Logger>


icon clock
10 |1500

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

Click below to post an Idea Post Idea