Try PubSub+
If you haven't already, check out our new Developer Portal! You'll find useful information about Solace PubSub+ as well as handy resources to get you started.

OutOfMemoryError: parsing SMF Message (message too big): GC overhead limit exceeded

sateeshsateesh Member Posts: 2
edited October 22 in PubSub+ Software

We are using Solace JMS to read data from JMS Queues and we are constantly seeing the following Error and it is bringing down the client

   _ OutOfMemoryError parsing SMF message (message too big): Java heap space
           at com.solacesystems.jcsmp.protocol.smf.SMFWireMessageHandler.readMessage(
           at com.solacesystems.jcsmp.protocol.nio.impl.SubscriberMessageReader.processRead(
           at com.solacesystems.jcsmp.protocol.nio.impl.SyncEventDispatcherReactor.processReactorChannels(
           at com.solacesystems.jcsmp.protocol.nio.impl.SyncEventDispatcherReactor.eventLoop(
           at com.solacesystems.jcsmp.protocol.nio.impl.SyncEventDispatcherReactor$

We are running the java app with JVM Args -Xms2048m and -Xmx12288m
Seems like there is a resource leak some where in the code.



  • sateeshsateesh Member Posts: 2
    edited October 9

    To add some context to the Above Issue we are running 50 Consumers . Each consumer trying to consume the data from JMS Queue as single consumer is unable to keep up with the pace with which data is produced.
    We ran the SDKPerf to check the stats and if we run single consumer it is only consuming around 60 messages per second and we need to consume 2000 messages per second and hence we are running 50 consumers with each consumer getting it's own JNDI Context, JMS Connection and JMSSession.
    If we use the same JMS Connection across the 50 Consumers then we are not consuming 2000msg/sec rate and hence we decided to use consumer independent JNDI Context, JMS Connection and session.

  • AaronAaron Member, Moderator, Employee Posts: 8 mod

    Hi Sateesh. Ok, interesting to hear about your issues. I'm wondering a couple things:
    - How big are your messages? I'm wondering why even SdkPerf can only receive 60 msg/s. Are you bandwidth limited? Or CPU limited?
    - If you run the SdkPerf consumer again, with -cc=2 (2 consumers), does it scale linearly? If not, does running it with "-cc=2 -cpc" help?
    - On your queue, what is the value of "Max Delivered Unacked Msgs Per Flow"? This is essentially the "prefetch" from the queue that the API can receive

    It sounds like the API is pulling down a bunch of messages from the queue that the application is not processing fast enough and causing the Heap error. If you turn down the max-unacked-per-flow to something much smaller (e.g. 10?) it should help prevent that.

    Let me know if that helps!

  • jeremyjeremy Administrator Posts: 26 admin

    @sateesh I wanted to check if the above response from Aaron was able to help. If not, please let us know and we can continue to assist!

Sign In or Register to comment.