You may also be able to
use the "ZMQ_TCP_KEEPALIVE" option to help with observation 2.
Joshua
许海玲
May 15, 2013
11:05 PM
Hello
zmq guys,I am writing this letter to confirm whether zmq
PUB/SUB socket tcp connection have no timeout mechanism.Recently,
I am coding with ZMQ
storing say a million msgs in its outgoing buffer and when the client has
finally caught up and consumed all msgs?
I am seeing that the memory usage goes up as the client is slow or not
there but even after the client comes back and consumes all msgs.. the
memory stays where it was.. any comments?
There are few solutions to the problem:
1. As mentioned above you can enable the tcp keep alive
2. Make the publisher connect to the subscriber and make the subscriber
bind, if the connection is dead the publisher will recognize that and
reconnect.
3. Use xsub and xpub and sent keep keep alive mes
Hi Shueng Chaun,
Thanks for this. I've backported these two commits to zeromq3-x
stable. Do you know if there are Jira issues for them?
-Pieter
On Thu, May 16, 2013 at 7:06 AM, KIU Shueng Chuan wrote:
> Hi Pieter,
>
> This is the commit in master for the above-mentioned signaler.cpp assertion:
On May 16, 2013 4:07 PM, "Nishant Mittal" wrote:
>
> storing say a million msgs in its outgoing buffer and when the client has
> finally caught up and consumed all msgs?
>
> I am seeing that the memory usage goes up as the client is slow or not there
> but even after the client comes back and co
thanks Pieter.. my application is just a zmq_proxy running in a thread.. so
I am not dealing with msgs in that application.. including the code for the
device below..
#include "TopicDevice.h"
clTopicDevice::clTopicDevice(void *z_ctx, int front, int back) {
int linger = 0;
z_sub = zmq_socket (z_c
If you're paranoid, and operating on a platform supporting Valgrind (or its
equivalent)
you could profile memory usage.
Valgrind is nice in that it will actually provide you the offending
"malloc" that was never
"free"d during program execution.
--
Wolf
On Thu, May 16, 2013 at 1:14 PM, Nishant
bad choice of words on my part.. i didnt mean to imply zeromq is leaking
memory.. what I think is happening is that once the outgoing buffer grows
to a certain size.. it keeps that as reserve for the future (and does not
free it).. just wanted to confirm that this is wat is happening indeed and
is
On Thu, May 16, 2013 at 7:41 PM, Nishant Mittal wrote:
> bad choice of words on my part.. i didnt mean to imply zeromq is leaking
> memory.. what I think is happening is that once the outgoing buffer grows to
> a certain size.. it keeps that as reserve for the future (and does not free
> it).. ju
pretty much all OSes do not shrink the user space back
after memory has been freed.
on the other hand, if its not being used, it doesn't hurt much.
the only way to really fix this issue is to use shared memory
for the buffer (external to zmq), and then release the segment.
On May 16, 2013, at 10:
I am on 64-bit Ubuntu
thanks
On Thu, May 16, 2013 at 1:58 PM, Pieter Hintjens wrote:
> On Thu, May 16, 2013 at 7:41 PM, Nishant Mittal wrote:
>
> > bad choice of words on my part.. i didnt mean to imply zeromq is leaking
> > memory.. what I think is happening is that once the outgoing buffer
ok thanks for confirming.
On Thu, May 16, 2013 at 2:03 PM, Andrew Hume wrote:
> pretty much all OSes do not shrink the user space back
> after memory has been freed.
> on the other hand, if its not being used, it doesn't hurt much.
>
> the only way to really fix this issue is to use shared memo
For the 1st one, a related entry is LIBZMQ-492. The submitter changes the
Event to a Mutex which is better since the OS will release the Mutex
automatically on program abort.
For the 2nd one, LIBZMQ-519 seems related. The submitter says that creating
and closing a socket fails after 16000 iteratio
Hi Joshua,
I tried the TCP_KEEPALIVE, IDLE, CNT etc optiions, but it seems not work. I
guess, the subscriber should reconnect the publisher if KEEPALIVE IDLE
timeout (in second), however, i wait for a long time, it doesn't do it.
Maybe I should get something like event on uplayer, so that I can cl
Hi Doron,
Thanks for your suggestions.
for option 2:
do you mean establish another reverse SUB-PUB connection? or other type of
zmq socket?
for option 4:
Reconnect from subcriber solved the communication recovery problem. But
the publisher will always send messages to the dead connection as my
15 matches
Mail list logo