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 for every node within the cluster.
POST /pools/default
Memory quota | Description |
---|---|
Method |
|
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: localhost:8091 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Authorization: Basic YWRtaW46YWRtaW4= Content-Length: xx memoryQuota=[quotaNumber]
Curl request syntax:
curl -X POST -u [admin]:[password] -d memoryQuota=[quotaNumber] -d indexMemoryQuota=[quotaNumber] -d ftsMemoryQuota=[quotaNumber] http://localhost:port/pools/default
Example
Raw HTTP request that sets the memory quota for a cluster at 400MB:
POST /pools/default HTTP/1.1 Host: 127.0.0.1:8091 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Authorization: Basic YWRtaW46YWRtaW4= Content-Length: xx memoryQuota=400
Curl request example that sets the memory quota for a cluster at 400MB:
curl -X POST -u Administrator:password -d 'memoryQuota=400' \ http://127.0.0.1:8091/pools/default