question

Upvotes
Accepted
3 1 1 4

Excessive memory usage when using RFA8 libraries

We are using RFA8 libraries to connect to Reuters.

We have observed that the memory utilization of our service has increased and it is gradually increasing daily whenever we access reuters. Seems a memory leak with RFA8.

Please advise as we are afraid that our service might crash anytime due to OutOfMemoryException

trepworld-checkrfarfa-apimemory
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
11.3k 25 8 13

The memory growth issue has been fixed on RFA .Net 8.0.1.E1 and later version. The memory usage keep on increasing when application tried to repeatedly create and destroy OMMConsumer event source.

------------------
rfanet8.1.0.E1.win
------------------
	[RFA-501] - CaseId 07546808 Memory Growth in RFA.Net when multiple threads repeatedly initialize RFA, request item and uninitialize RFA.
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.

Upvote
1.5k 3 5 7

You haven't specified which flavour of RFA you are using (Java, C++, etc).

Yet, I'll attempt a guess:

RFA library has an internal queue (by default) which acts as a buffer between what the library receives from the wire and your application's processing of events. If your application processes events too slowly then this in-memory queue will grow leading to an ever increasing memory usage. Thus, in such case, the real culprit is that your event processing is simply too slow. Try to review exactly what your are doing in the event processing. As an example, if your application receives 10,000 msg per seconds from TREP but your logic can only handle say 1,000 events per second then excessive queuing is bound to occur. If it continues for an extended period of time then your application will eventually run out of memory.

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.

In our WCF event processing, there is no such concrete logics that could slow down the event processing. Our logic accepts the requests from the users and responds back.

The memory increase is even observed under very low load conditions probably with count of requests less than 30 per cycle. The WCF service is hosted on windows service and the memory utilization of the service is gradually

With respect to memory footprints, the same part of our code is behaving normally with RFA.NET 7 libraries whereas the heavy memory utilization is observed with RFA.NET 8 libraries.

Click below to post an Idea Post Idea