Refinitiv / Real-Time-SDK

Other
186 stars 129 forks source link

Consumer does not release objects when it is unable to connect in EMA Java #210

Closed ardyesp closed 1 year ago

ardyesp commented 2 years ago

A client reported this issue where repeatedly trying to create an OMMConsumer which does not connect, results in heap memory increase and eventual failure. I can verify it with following snippet of code:

while(consumer == null) {
  try {
    consumer  = EmaFactory.createOmmConsumer( config.host(hostStr).username(userStr) );
  }
  catch(Throwable e)    {
    System.out.println("Consumer is null");
  }
}

Result after running for two hours, some of the objects aren't getting GC'd: heap

L-Karchevska commented 2 years ago

@ardyesp Thank you for bringing up this issue and presenting steps for reproduction, we will investigate it. Could you also provide the hostStr and userStr values that you are using?

ardyesp commented 2 years ago

Hi @L-Karchevska, These parameters are irrelevant, but here they are:

hostStr = localhost userStr = radmin

ardyesp commented 1 year ago

I have tried the issue with RTSDK 2.7.0.L1 and don't see it anymore. Objects are getting GC'd properly now.

image