Skip to content

Buffer Memory Increases when Polling for messages #156

Open
@krishnatejap

Description

@krishnatejap

Hi @ibmmqmet,

We are using this module to fetch messages. The application is containerized. The application code is written as follows:

  1. make a connection to the IBMMQ Queue Manager using mq.Connx and Open the Queue using mq.Open. The connection is now Open.
  2. Using while loop, attempt to read a message using mq.GetSync. In case there is a message, decode and process it. Sleep for "x" seconds.
  3. Continue 2 until the connection is lost, thereby making an attempt to reconnect and read the message - read from 1.

The size of the messages in our MQ is 100KB. We initialized the buffer with length 102400. Instead of allocating a new buffer for every read operation, we are initializing one at the time of connect and using it every time we try to read a message.

Problem

There seems to be a memory leak in the function call mq.GetSync which is causing the application memory to increase exponentially - since we have already initialized and using the same buffer memory for every read, I think this is unexpected.

Can you please help me here?

  • Version 0.9.23

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions