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

mystery query time out and views_timeout

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Critical
    • 2.3.0
    • 2.2.0
    • library
    • Security Level: Public
    • None

    Description

      Hi,

      Many people have reported that queries are broken due to mystery time out, while the server's load is not heavy, even with only 1 client. But there is no clear explanation yet. Unfortunately, I hit the same bug and have to dig it myself.

      After digging into the libcouchbase source code, I found that there is a field called views_timeout in the lcb instance set in lcb_create():

      obj->views_timeout = LCB_DEFAULT_VIEW_TIMEOUT; // 75000000 -> 75 sec

      And lcb_http_request_connect() sets it as the connection timeout:

      conn->timeout.usec = req->instance->views_timeout;

      Thus, all queries longer than 75 sec will be interrupt by the timer.

      We can use lcb_set_view_timeout() to set a longer views_timeout. Unfortunately, there is no doc in couchbase.com to describe this:

      https://www.google.com/search?q=lcb_set_view_timeout+site%3Acouchbase.com

      And there is no such an interface exposed by the python client library.

      I suggest that we need to add this interface to python client libraries, and add a doc into related documents.

      thanks,

      Lenx

      Attachments

        Issue Links

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

          Activity

            People

              mnunberg Mark Nunberg (Inactive)
              lenx.wei Tao Wei
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty