Uploaded image for project: 'Couchbase PHP client library'
  1. Couchbase PHP client library
  2. PCBC-226

HTTP needs to be a POST after a certain size

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 1.2.0
    • 1.1.2
    • library
    • Security Level: Public
    • None
    • Mac OS X, CentOS

    Description

      I'm querying a view using the PHP SDK using the view method, $object->view($ddocname [, $viewname ] [, $viewoptions ]), and finding that when I pass in a certain number of keys in the viewoptions param, the method silently fails and just returns null. It appears that 164 keys is OK, but 179 is not. I didn't see documentation indicating a key limit and would expect an error if there were.
      Here's the call:
      // 179 keys breaks, 164 OK
      $result = $this->cb->view(self::VIEW_DAP,'modelcount',array('keys' => $keys,
      'group_level' => 2,
      'group' => true,
      'skip' => 0)

      Here's a link to the forum thread I created:
      http://www.couchbase.com/forums/thread/key-limit-view-queries

      As you'll see in the responses, this is probably a much more general issue that the PHP SDK uses GET calls that have a string length limit. It seems that the SDK should either use POSTs to avoid the limit or document the size limits in the documentation.

      Attachments

        For Gerrit Dashboard: PCBC-226
        # Subject Branch Project Status CR V

        Activity

          People

            trond Trond Norbye
            rdominy Robert Dominy
            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