A newer version of this documentation is available.

View Latest

Setting Memory Quota

    +
    Memory quota is set with the POST /pools/default HTTP method and URI.

    HTTP method and URI

    The memory quota configures how much RAM to be allocated to Couchbase Server per service, for every node in the cluster.

    POST /pools/default
    Memory quota Description

    Method

    POST /pools/default

    Request Data

    Payload with memory quota setting

    Response Data

    Empty

    Authentication Required

    yes

    Syntax

    Raw HTTP request syntax:

    POST /pools/default HTTP/1.1
    Host: 10.143.192.102:8091
    Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 100
    Content-Type: application/x-www-form-urlencoded

    Curl request syntax:

    curl -X POST -u [admin]:[password]
      -d memoryQuota=[quotaNumber]
      -d indexMemoryQuota=[quotaNumber]
      -d ftsMemoryQuota=[quotaNumber]
      -d cbasMemoryQuota=[quotaNumber]
      -d eventingMemoryQuota=[quotaNumber]
          http://localhost:port/pools/default

    Example

    Curl request example:

    curl -v -X POST -u Administrator:password \
    http://10.143.192.102:8091/pools/default \
    -d "memoryQuota=256" \
    -d "indexMemoryQuota=256" \
    -d "ftsMemoryQuota=256" \
    -d "cbasMemoryQuota=1048" \
    -d "eventingMemoryQuota=512"

    Response codes

    Response codes Description

    200

    OK

    400

    Bad Request JSON: The RAM Quota value is too small.

    401

    Unauthorized

    The following is an example HTTP response code:

    HTTP/1.1 200 OK
    Content-Type: application/json
    Content-Length: 0