[zeromq-dev] Problem with fileserver / fileclient

Pieter Hintjens ph at imatix.com
Mon Nov 19 02:01:55 CET 2012


Stathis,

I've tested this in detail.

Tthere seems to be a problem with the HWM in the ROUTER, which is
dropping outgoing messages unexpectedly. That is, the HWM setting of
10 isn't actually enough for 10 outgoing messages.

What it looks like is that the HWM is in fact per message frame, not
per message. So in this case you'd have to use:

    zsocket_set_hwm (router, PIPELINE * 2);

In the router since the identity frame is counted in the HWM calculation.

This is a bug IMO, or at least it's rather surprising.

-Pieter




On Mon, Nov 19, 2012 at 3:13 AM, Stathis Gkotsis
<stathis.gkotsis at commsquare.com> wrote:
> Indeed, sorry about this, here are the two links to the code:
>
> http://pastebin.com/1DLa4e2J
> http://pastebin.com/cbJUxJB4
>
> Thanks,
> Stathis
> ________________________________________
> From: zeromq-dev-bounces at lists.zeromq.org [zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Min [miniway at gmail.com]
> Sent: Sunday, November 18, 2012 7:36 PM
> To: ZeroMQ development list
> Subject: Re: [zeromq-dev] Problem with fileserver / fileclient
>
> The two links seem to be identical.
>
> Could you upload the client code also ?
>
> Thanks
> Min
>
>
> On Mon, Nov 19, 2012 at 1:22 AM, Stathis Gkotsis <stathis.gkotsis at commsquare.com<mailto:stathis.gkotsis at commsquare.com>> wrote:
> Hello,
>
>    I am using zeromq v3.2.1-RC2 on Ubuntu 10.04 / Ubuntu 12.04 64bit. I created two simple apps: one fileserver and one fileclient, based on the "File Transfer" example code in the documentation (http://zguide.zeromq.org/page:all#header-151 , model 3). The code for these two example apps can be found here: http://pastebin.com/AuGU9EDC and here: http://pastebin.com/LusbjGCa . As you can see, I use a file of 100KB.
>
> The problem is that when I start the server and then run the client multiple times, sometimes it receives less than 102400 bytes, like: 98304 or 94208 or 90112 bytes. For example, when I run the client 1000 times with an interval of 100ms between the runs, for 970 runs it receives 12400 bytes, while for the rest (30 runs) it receives less bytes. I am bit puzzled by this, could you help?
>
> Thanks,
> Stathis
> _______________________________________________
> 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
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev



More information about the zeromq-dev mailing list