Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-1232

Handle HTTP 429 for FTS

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.6.1, 2.5.9
    • 2.7.0
    • FTS

    Description

      With the recent changes in FTS the query can be rejected by the server with cbft process reached memory quota limit.

      The response in this case is HTTP 503 with body 

      {\"error\":\"rest_index: Query, indexName: perf_fts_index, err: search request rejected\" ** ,\"request\":{\"ctl\" {\"consistency\":null,\"timeout\":74499},\"explain\":false,\"facets\":null,\"fields\":null,\"from\":0,\"highlight\":null,\"includeLocations\":false,\"pindexNames\":[\"perf_fts_index_5cc1efc039b2ffe2_18572d87\",\"perf_fts_index_5cc1efc039b2ffe2_6ddbfb54\",\"perf_fts_index_5cc1efc039b2ffe2_f4e0a48a\"],\"query\":{\"field\":\"text\",\"wildcard\":\"ma*a\"},\"size\":10,\"sort\":[\"-_score\"]},\"status\":\"fail\"}\n","request":{"ctl":{"timeout":75000},"query":{"field":"text","wildcard":"ma*a"},"size":10},"status":"fail"}

       

      Two issues with that on client side:

      1) the SDK returns misleading error

      DefaultSearchQueryResult{error=com.couchbase.client.java.error.FtsMalformedRequestException: FTS request is malformed. Details:...

      2) Also following warning is printed to log for every 503 response:

      WARNING: Unknown ResponseStatus with Protocol HTTP: 503  com.couchbase.client.core.endpoint.ResponseStatusConverter fromHttp

       

       

       

      Attachments

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

        Activity

          Based on recent discussion FTS will return HTTP 429 (too many requests) which we are going to retry on with a configurable delay.

          daschl Michael Nitschinger added a comment - Based on recent discussion FTS will return HTTP 429 (too many requests) which we are going to retry on with a configurable delay.
          abhinav Abhinav Dangeti added a comment - Michael Nitschinger   http://review.couchbase.org/#/c/99174/

          Build couchbase-server-6.0.0-1601 contains cbgt commit 1d34615 with commit message:
          JCBC-1232: Status response for a query in an OOM situation

          build-team Couchbase Build Team added a comment - Build couchbase-server-6.0.0-1601 contains cbgt commit 1d34615 with commit message: JCBC-1232 : Status response for a query in an OOM situation

          Build couchbase-server-6.5.0-1286 contains cbgt commit 1d34615 with commit message:
          JCBC-1232: Status response for a query in an OOM situation

          build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-1286 contains cbgt commit 1d34615 with commit message: JCBC-1232 : Status response for a query in an OOM situation

          Build couchbase-server-6.5.0-1289 contains cbft commit 0f69f56 with commit message:
          JCBC-1232: Status response for a query in an OOM situation

          build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-1289 contains cbft commit 0f69f56 with commit message: JCBC-1232 : Status response for a query in an OOM situation

          Build couchbase-server-6.0.0-1607 contains cbft commit 0f69f56 with commit message:
          JCBC-1232: Status response for a query in an OOM situation

          build-team Couchbase Build Team added a comment - Build couchbase-server-6.0.0-1607 contains cbft commit 0f69f56 with commit message: JCBC-1232 : Status response for a query in an OOM situation

          I need to do it for analytics anyways, I'll pick this up for now

          daschl Michael Nitschinger added a comment - I need to do it for analytics anyways, I'll pick this up for now

          People

            daschl Michael Nitschinger
            oleksandr.gyryk Alex Gyryk (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty