Here is an example of the errors I got when I enabled the 8.0 Data Service disk usage limit and ran into the limit.
Example â Java client using Couchbase java-client version 3.8.2:
com.couchbase.client.core.error.CouchbaseException: UpsertRequest failed with unexpected status code UNKNOWN
{
âcompletedâ: true,
âcoreIdâ: â0x65a11a7a00000001â,
âidempotentâ: false,
âlastChannelIdâ: â65A11A7A00000001/0000000078778567â,
âlastDispatchedFromâ: â172.168.0.201:51868â,
âlastDispatchedToâ: âabc-abcd-node-001.oaq8p0ij-sbtblbe.couchbase.com:11207â,
ârequestIdâ: 9,
ârequestTypeâ: âUpsertRequestâ,
âretriedâ: 0,
âserviceâ: {
âbucketâ: âbucket4â,
âcollectionâ: â_defaultâ,
âdocumentIdâ: â000001â,
âerrorCodeâ: {
âdescriptionâ: âDisk space where the bucket is deployed is above the configured threshold, writes to this bucket is rejectedâ,
ânameâ: âBUCKET_DISK_SPACE_TOO_LOWâ
},
âopaqueâ: â0xeâ,
âscopeâ: â_defaultâ,
âtypeâ: âkvâ,
âvbucketâ: 65
},
âstatusâ: âUNKNOWNâ,
âtimeoutMsâ: 2500,
âtimingsâ: {
âdispatchMicrosâ: 83155,
âencodingMicrosâ: 1137,
âtotalDispatchMicrosâ: 83155,
âtotalServerMicrosâ: 0,
âtotalMicrosâ: 102030,
âserverMicrosâ: 0
}
Example - from Query Workbench
INSERT INTO `bucket4`._default._default(KEY, VALUE) VALUES (âmykey3â, â{âfield1â:ânoteâ}â);
Result:
[
{
âcodeâ: 12009,
âmsgâ: âDML Error, possible causes include concurrent modification. Failed to perform INSERT on key mykey3 - cause: Error in INSERT of key: mykey3â,
âreasonâ: {
â_levelâ: âerrorâ,
âcallerâ: âcouchbase:2851â,
âcauseâ: {
âcauseâ: {
â_levelâ: âexceptionâ,
âcallerâ: âmemcached:580â,
âcauseâ: {
âattemptsâ: 1,
âcauseâ: âBUCKET_DISK_SPACE_TOO_LOWâ
},
âcodeâ: 5502,
âkeyâ: âdatastore.couchbase.bucket.actionâ,
âmessageâ: âUnable to complete action after 1 attemptsâ
},
âkeyâ: âmykey3â
},
âcodeâ: 12036,
âkeyâ: âdatastore.couchbase.insert.errorâ,
âmessageâ: âError in INSERT of key: mykey3â
}
}
]
Example - From python (KV insert)
% python3 ./kv_insert.py
<ec=1004, category=couchbase.network, message=protocol_error (1004), context=KeyValueErrorContext:{âretry_attemptsâ: 0, âkeyâ: âdocument-keyâ, âbucket_nameâ: âbucket4â, âscope_nameâ: â_defaultâ, âcollection_nameâ: â_defaultâ, âopaqueâ: 7, âstatus_codeâ: 56, âerror_map_infoâ: {âcodeâ: 56, ânameâ: âBUCKET_DISK_SPACE_TOO_LOWâ, âdescriptionâ: âDisk space where the bucket is deployed is above the configured threshold, writes to this bucket is rejectedâ, âattributesâ: {1, 18, 19}}}, C Source=/Users/couchbase/jenkins/workspace/python/sdk/python-scripted-build-pipeline/py-client/src/kv_ops.cxx:680>
Also, if you enable the Data disk usage limit, you can monitor whether the limit has been reached using the Prometheus stat/metric âcm_resource_limit_reachedâ with resource=âkv_disk_usageâ.
Example:
cm_resource_limit_reached{instance="172.31.43.209:8091", job="test-cluster1", resource="kv_disk_usage", severity="maximum"} value will be 1 if the limit is reached