[zeromq-dev] subscriber module prompting "FATAL ERROR: OUT OF MEMORY"

Gary Davidson Gary.Davidson at interclick.com
Thu Sep 8 16:42:12 CEST 2011


What version of windows?

Try this and see if you get the same error

subscriber.setsockopt(ZMQ_SUBSCRIBE, "", 0);

I have run several tests on windows with 5 pubs and 1 sub and do 4+ million message all the time.

I am setting up a test to run several hundred million messages in a 24 hour test . My SLA is 1 billion in 24 hours.

Will let you know how it goes.



[Description: C:\Users\gary.davidson\AppData\Roaming\Microsoft\AD_interclick\logo.png]

Gary Davidson, Chief Software Architect
Gary.Davidson at interclick.com<mailto:Gary.Davidson at interclick.com>
P 561 300 2764
C 954 790 0715
F 561 300 2765

4800 T-Rex Avenue Suite 120
Boca Raton, FL 33431

www.interclick.com
NASDAQ: ICLK



From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Ilja Golshtein
Sent: Thursday, September 08, 2011 9:59 AM
To: ZeroMQ development list
Subject: Re: [zeromq-dev] subscriber module prompting "FATAL ERROR: OUT OF MEMORY"

Hello.

Your code looks correct, although I am not sure if is Ok to do setsockopt after connect.

I guess it is zmq internal thread what eats all memory.
To check if it is wrong just do some wait instead of recv.

The only way to solve comes to my mind - use HWM.
08.09.2011, 17:38, "Omer Bacharach" <omer at toot-trading.com<mailto:omer at toot-trading.com>>:

Hi
I'm using zmq on windows.
I'm using a subscriber with a filter to receive only "12345" a million times and I have a publisher sending "12345" repeatedly
When running both modules the subscriber shouts (after a while): "FATAL ERROR: OUT OF MEMORY".
Any idea?
Here is the relevant snippet from the subscriber's code:
    zmq::context_t context (1);
    //  Socket to talk to server
    std::cout << "Collecting updates from weather server…\n" << std::endl;
    zmq::socket_t subscriber (context, ZMQ_SUB);
    subscriber.connect("tcp://localhost:5556");
    subscriber.setsockopt(ZMQ_SUBSCRIBE, "12345", strlen ("12345"));
    int update_nbr;
    zmq::message_t update;
    for (update_nbr = 0; update_nbr < 1000000; update_nbr++)
 {

        subscriber.recv(&update);
        std::cout << update.size();
 }
Regards,
Omer.
--
Omer Bacharach
Director of Software Development
Toot Trading Ltd.
omer at toot-trading.com<mailto:omer at toot-trading.com>
Mobile +972-544-317959
Office +972-3-7449466



--
Omer Bacharach
Director of Software Development
Toot Trading Ltd.
omer at toot-trading.com<mailto:omer at toot-trading.com>
Mobile +972-544-317959
Office +972-3-7449466

_______________________________________________
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org<mailto:zeromq-dev at lists.zeromq.org>
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
--
Best regards,
Ilja Golshtein.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110908/304f9a83/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 8293 bytes
Desc: image001.png
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110908/304f9a83/attachment.png>


More information about the zeromq-dev mailing list