Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-115

Async Mode results in "network error" when many lcb_get() calls are made without use of lcb_wait() within loop

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0beta2
    • Fix Version/s: 2.0.0beta3
    • Component/s: library
    • Security Level: Public
    • Labels:
      None
    • Environment:
      CentOS 6.2, 64Bit

      Description

      Am receiving "network error" back from error callback when using lcb_get() within a loop, within a function, in libev async mode
      (regardless if I make 1 call with a long command list or many calls of 1 command each) after returning control to the
      event loop (ie; return back from this function).

      If I add an occasional lcb_wait() during some interval of calls before returning back, then this does not happen but, of course, I am blocked
      during this call so that is not really a solution.

      Appears to be event overflow related but not sure. We are not talking about millions of calls, maybe 100k-ish over the network,
      not loopback.

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        avsej Sergey Avseyev added a comment -

        What is the cluster config? Are all the nodes healthy always?

        Show
        avsej Sergey Avseyev added a comment - What is the cluster config? Are all the nodes healthy always?
        Hide
        avsej Sergey Avseyev added a comment -

        Is it possible you are reaching maximum request number?

        https://github.com/couchbase/libcouchbase/blob/9e90ce8ece72dd3eaad0ca0fcbe9054aecc411fd/src/event.c#L223

        In this case chances are that parse_single() return value bubbles. It returns positive number on success, but the caller treats any non-zero value as error

        Show
        avsej Sergey Avseyev added a comment - Is it possible you are reaching maximum request number? https://github.com/couchbase/libcouchbase/blob/9e90ce8ece72dd3eaad0ca0fcbe9054aecc411fd/src/event.c#L223 In this case chances are that parse_single() return value bubbles. It returns positive number on success, but the caller treats any non-zero value as error
        Hide
        avsej Sergey Avseyev added a comment -

        If so, it should be fixed if the function will return zero instead of rv at the end

        https://github.com/couchbase/libcouchbase/blob/9e90ce8ece72dd3eaad0ca0fcbe9054aecc411fd/src/event.c#L247

        Show
        avsej Sergey Avseyev added a comment - If so, it should be fixed if the function will return zero instead of rv at the end https://github.com/couchbase/libcouchbase/blob/9e90ce8ece72dd3eaad0ca0fcbe9054aecc411fd/src/event.c#L247
        Hide
        avsej Sergey Avseyev added a comment -
        Show
        avsej Sergey Avseyev added a comment - Fixed in http://review.couchbase.org/22310
        Hide
        mleib Michael Leib added a comment -

        I have verified that this indeed solves the problem. YEAH!!!!

        I am getting timeouts now, but that is unrelated and I will need to increase the wait time - I am beating the server pretty hard.

        Thanks to all -

        MIchael

        Show
        mleib Michael Leib added a comment - I have verified that this indeed solves the problem. YEAH!!!! I am getting timeouts now, but that is unrelated and I will need to increase the wait time - I am beating the server pretty hard. Thanks to all - MIchael

          People

          • Assignee:
            avsej Sergey Avseyev
            Reporter:
            mleib Michael Leib
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes