Skip to content
This repository was archived by the owner on Nov 14, 2019. It is now read-only.
This repository was archived by the owner on Nov 14, 2019. It is now read-only.

why not use res but SIM_PACKETS at statsd.c? #56

Description

@wy92

Activity

  1. jeanpi commented on Jul 6, 2017

    @jeanpi

    +1

  2. gleonid commented on Jul 6, 2017

    @gleonid

    +1

    we are running brubeck on Ubuntu 14.04.

    used config:
    "samplers" : [ { "type" : "statsd", "address" : "0.0.0.0", "port" : 8126, "workers" : 4, "multisock" : true, "multimsg" : 8 }
    note value for multimsg.

    Had our log filled with:
    instance=brubeck sampler=statsd event=packet_dropped

    After we changed multimsg from 8 to 1 - errors stopped

  3. gleonid commented on Jul 6, 2017

    @gleonid

    please consider following code change as a fix to src/samplers/statsd.c:

    @@ -51,9 +51,9 @@ static void statsd_run_recvmmsg(struct brubeck_statsd *statsd, int sock)
                    }
    
                    /* store stats */
    -               brubeck_atomic_add(&statsd->sampler.inflow, SIM_PACKETS);
    +               brubeck_atomic_add(&statsd->sampler.inflow, res);
    
    -               for (i = 0; i < SIM_PACKETS; ++i) {
    +               for (i = 0; i < res; ++i) {
                            char *buf = msgs[i].msg_hdr.msg_iov->iov_base;
                            char *end = buf + msgs[i].msg_len;
                            brubeck_statsd_packet_parse(server, buf, end);
    
  4. bascarsija commented on Dec 28, 2017

    @bascarsija

    note that this appears to be a duplicate of #42

  5. gleonid commented on Dec 30, 2017

    @gleonid

    is there plans to apply above fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions