[rabbitmq-discuss] [rabbitmq-c-master] memory leakink while reconnect.
alan.antonuk at gmail.com
Tue Feb 11 05:42:33 GMT 2014
You do not need to address your emails to rabbitmq-discuss-owner@ or
rabbitmq-discuss-request@ when posting to the discussion list.
rabbitmq-discuss@ is sufficient.
On Mon, Feb 10, 2014 at 9:01 PM, Rohit Patle
<Rohit.Patle at techmahindra.com>wrote:
> I am using rabbitmq-c client library v0.4.1.
> Here is the condition that, I need to pole for the connection
> re-establishment in the interval of every 30 sec, if there is a network
> failure or my RMQ is down. While performing this I am observing that there
> is some memory leak with my rabbitmq client library, which is gradually
> increases and the library is not returns back the amount of memory acquired
> by it to the system. Due to the reason after certain period of time the
> system is unable to allocate memory for amqp_new_connection().
> To over come the issue I tried with amqp_connection_close() if in case I
> got "opening SSL/TLS connection", but it is of no use as it is not helping
> me to release back the acquired memory by rabitmq library to system. Also I
> am not able to do amqp_destroy_connection() because the connection is not
> establish yet successfully.
I'm confused as to what you're doing.
amqp_destroy_connection() should be called for every
amqp_connection_state_t you create with amqp_new_connection(). It doesn't
matter if you're able to successfully connect to the broker or not, you
will need to destroy the amqp_connection_state_t object.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss