question

Upvotes
Accepted
4 2 1 3

EMA TRCC OmmMemoryExhaustionException

Hi,

I'm testing my C++ EMA TRCC application on Linux and periodically I get the following exception while posting (via OmmConsumer::submit) messages (PostMsg):

loggerMsg
    TimeStamp: 2019/03/01 04:19:50.731
    ClientName: Consumer_1_1
    Severity: Error
    Text:    Internal Error. Failed to allocate RsslTunnelStreamBuffer in TunnelItem::submitSubItemMsg( RsslMsg* ).
loggerMsgEnd

I use UserDispatch model and I suspect that due to periodical data rate spikes on my side I submit too many messages before OmmConsumer::dispatch call. I tried to increase (from 5000 to 10000) GuaranteedOutputBuffers configuration parameter but it didn't help. Is there any way to handle such memory issues?

UPDATE:

If solicitAsck mode is used for posting it seems that API doesn't free internal buffers (for messages) until it receive appropriate ACK from server (or timeout). If the server is slow in sending ACKs or Internet connection is used (network delays are possible) this might cause the growth of already sent messages waiting for ACK.

Thanks

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-apircc-apiexception
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.

Asked an expert - Dominic Allison.

Upvotes
Accepted
79.1k 250 52 74

@evgeniyk

When calling the submit method of the tunnel stream, this method gets a buffer from TunnelStreamRequest.guaranteeOutputBuffers, encodes the data to it, and puts the encoded buffer to an internal queue waiting to be dispatched by a dispatcher thread. The application needs to dispatch in order to send data to the network.

The dispatcher thread gets the encoded buffer from the queue, encodes it to the buffer from Channel.guaranteeOutputBuffers and then sends it to the network.

In summary, TunnelStreamRequest.guaranteeOutputBuffers is used by the ETA Value-Added Reactor, and the buffers are put into the internal queue. Channel.guaranteeOutputBuffers is used by the ETA library to send data to the network.

To get more information, we need to review the code or contact the development team for internal implementation. Therefore, please submit a case to the API support team via Contact Premium Support .

If you don't see this option, please contact your colleague who has RDC subscription to submit a case on your behalf.


buffer.png (10.4 KiB)
premium.png (27.8 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.

@jirapongse.phuriphanvichai

Thank you for complete explanation. Testing with increased TunnelStreamRequest.guaranteeOutputBuffers showed no issues.

Upvotes
4 2 1 3

I tried to workaround this issue by reducing (from default 15000ms down to 5ms) PostAckTimeout configuration parameter. I was expecting that API will generate NACK and additionally it will remove cached message that wait for aknowlegment from the server, but surprisingly the change of PostAckTimeout did do anything. It simply doesn't work, I didnt get any NACKs even with PostAckTimeout=5ms (which must be guaranteed NACKs for almost all posted messages on Internet connection).

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
79.1k 250 52 74

@evgeniyk

For a tunnel stream, you also need to set guaranteedOutputBuffers of TunnelStreamRequest.

TunnelStreamRequest tsr;
tsr.classOfService(cos).domainType(MMT_SYSTEM).name("Seikan").serviceName("DDS_TRCE");
tsr.guaranteedOutputBuffers(5000);
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
4 2 1 3

@jirapongse.phuriphanvichai

Thank you for response. I didn't notice that TunnelStreamRequest has such setting and I'll let you know if it help after testing. Could you please explain how these parameters are correlated (global GuaranteedOutputBuffers and individual per Tunnel stream GuaranteedOutputBuffers)?

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.

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.