qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shan Wang" <Shan.W...@igindex.co.uk>
Subject c++ client has memory leak when queue is full and the client tries to reconnect
Date Fri, 05 Jun 2009 18:58:41 GMT
When the queue reaches its full capacity, and a c++ client tries to put
a message to the queue, the client execute() will throw an exception and
the connection will be closed by broker. After that, if the client tries
to call FailoverManager::connect() again to the same queue, it will
succeed but the memory increases about 2MB each time it connects.
Sometimes my application still have tens of thousands of messages when
the queue is full and this problem has caused my program to crash after
exhausting all the available memory. 


The queue is declared as durable, and the client program is not far from
the replay_sender example. I tried to close the connection explicitly
before reconnecting, or close/flush/suspend the session associated to
the connection, but in the end I still have the same result. Can anyone
please advice me how can I avoid this memory consumption? Or
alternatively, is there anyway to tell from the client side if the queue
it's talking to is full or not, so I don't have to call connect() until
the queue is cleared, of course assuming this method won't cause the
same memory leak.



Thanks a lot,



The information contained in this email is strictly confidential and for the use of the addressee
only, unless otherwise indicated. If you are not the intended recipient, please do not read,
copy, use or disclose to others this message or any attachment. Please also notify the sender
by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email
and any copies of it. Opinions, conclusions (etc.) that do not relate to the official business
of this company shall be understood as neither given nor endorsed by it. IG Index plc is a
company registered in England and Wales under number 01190902. VAT registration number 761
2978 07. Registered Office: Friars House, 157-168 Blackfriars Road, London SE1 8EZ. Authorised
and regulated by the Financial Services Authority. FSA Register number 114059.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message