Server Build : 7.0.2 build 6703
Java SDK : 3.2.6
Scenario :
- 3 nodes cluster, replicas=2, durability=majority
- Cluster quota: 24GB, 8 CPU per VM
- 2 collections, ~100m documents
- kvTimeout=10 seconds
- Replace or Insert all documents in a row one by one, 1000 transactions per second
- On each VM: Average %idle 35-40%, Average %memused 65-75%
- bucket resident 40%
Observation :
For some seconds the following exception is thrown multiple times:
May 6 04:49:58 XXXza-profiling za-profiling-profiles[-]: log:com.couchbase.client.core.error.AmbiguousTimeoutException: SubdocMutateRequest, Reason: TIMEOUT {âcancelledâ:true,âclientContextâ: {âisIdempotentâ:true}
,âcompletedâ:true,âcoreIdâ:â0x3eb621a800000004â,âidempotentâ:false,âlastChannelIdâ:â3EB621A800000004/00000000B45256BEâ,âlastDispatchedFromâ:â10.233.90.21:45798â,âlastDispatchedToâ:âlhvmsrv3196-lb.lh.upstreamsystems.com:11210â,âreasonâ:âTIMEOUTâ,ârequestIdâ:76219536,ârequestTypeâ:âSubdocMutateRequestâ,âretriedâ:0,âserviceâ:{âbucketâ:âprofilesâ,âcollectionâ:âuser_profileâ,âdocumentIdâ:"_sXK-QJ8iJSOUq5aiW1sKQ",âopaqueâ:â0x48aabb2â,âscopeâ:âdataâ,âtypeâ:âkvâ,âvbucketâ:624},âtimeoutMsâ:10000,âtimingsâ:{âencodingMicrosâ:33,âtotalMicrosâ:10006238}}
So, mutations were canceled after the configured timeout of 10 seconds without any retry. All timeouts originated from the same VM.
At the same time, Couchbase server prints the following:
memcached.log
2022-05-06T04:49:51.220646+00:00 WARNING 181: Slow operation: {âbucketâ:âprofilesâ,âcidâ:â3EB621A800000004/00000000B45256BE/48aabb2â,âcommandâ:âSUBDOC_MULTI_MUTATIONâ,âdurationâ:â13 sâ,âpacketâ: {âbodylenâ:514,âcasâ:0,âdatatypeâ:ârawâ,âextlenâ:0,âkeyâ:"._sXK-QJ8iJSOUq5aiW1sKQ",âkeylenâ:23,âmagicâ:âClientRequestâ,âopaqueâ:2997586436,âopcodeâ:âSUBDOC_MULTI_MUTATIONâ,âvbucketâ:624}
,âpeerâ:"{âipâ:â10.168.104.52â,âportâ:20810}",âtraceâ:ârequest=2124376153275375:12597635 execute=2124376153275375:30 execute=2124376172404327:4026 execute=2124388750889725:21â,âworker_tidâ:140409586050816}
2022-05-06T04:49:51.225152+00:00 WARNING 181: Slow operation: {âbucketâ:âprofilesâ,âcidâ:â3EB621A800000004/00000000B45256BE/48ab206â,âcommandâ:âGET_CLUSTER_CONFIGâ,âdurationâ:â10 sâ,âpacketâ: {âbodylenâ:0,âcasâ:0,âdatatypeâ:ârawâ,âextlenâ:0,âkeyâ:"",âkeylenâ:0,âmagicâ:âClientRequestâ,âopaqueâ:112364036,âopcodeâ:âGET_CLUSTER_CONFIGâ,âvbucketâ:0}
,âpeerâ:"{âipâ:â10.168.104.52â,âportâ:20810}",âresponseâ:âSuccessâ,âtraceâ:ârequest=2124378363635916:10396399 execute=2124388760002294:32â,âworker_tidâ:140409586050816}
2022-05-06T04:49:51.316574+00:00 INFO (profiles) Compaction of vb:980 done (ok). purged tombstones:0, prepares:3310, prepareBytes:2208372 collection_items_erased:alive:0,deleted:0, size/items/tombstones/purge_seqno pre{69107811, 100594, 0, 0}, post{38113379, 97284, 0, 0}
Is this the expected behavior? Could you please elaborate on how could be solved? Do we need more CPU or RAM?
Other memcached.logs during timeouts:
2022-05-06T04:49:51.220646+00:00 WARNING 181: Slow operation: {âbucketâ:âprofilesâ,âcidâ:â3EB621A800000004/00000000B45256BE/48aabb2â,âcommandâ:âSUBDOC_MULTI_MUTATIONâ,âdurationâ:â13 sâ,âpacketâ: {âbodylenâ:514,âcasâ:0,âdatatypeâ:ârawâ,âextlenâ:0,âkeyâ:"._sXK-QJ8iJSOUq5aiW1sKQ",âkeylenâ:23,âmagicâ:âClientRequestâ,âopaqueâ:2997586436,âopcodeâ:âSUBDOC_MULTI_MUTATIONâ,âvbucketâ:624}
,âpeerâ:"{âipâ:â10.168.104.52â,âportâ:20810}",âtraceâ:ârequest=2124376153275375:12597635 execute=2124376153275375:30 execute=2124376172404327:4026 execute=2124388750889725:21â,âworker_tidâ:140409586050816}
2022-05-06T04:49:51.225152+00:00 WARNING 181: Slow operation: {âbucketâ:âprofilesâ,âcidâ:â3EB621A800000004/00000000B45256BE/48ab206â,âcommandâ:âGET_CLUSTER_CONFIGâ,âdurationâ:â10 sâ,âpacketâ: {âbodylenâ:0,âcasâ:0,âdatatypeâ:ârawâ,âextlenâ:0,âkeyâ:"",âkeylenâ:0,âmagicâ:âClientRequestâ,âopaqueâ:112364036,âopcodeâ:âGET_CLUSTER_CONFIGâ,âvbucketâ:0}
,âpeerâ:"{âipâ:â10.168.104.52â,âportâ:20810}",âresponseâ:âSuccessâ,âtraceâ:ârequest=2124378363635916:10396399 execute=2124388760002294:32â,âworker_tidâ:140409586050816}
2022-05-06T01:51:16.912275+00:00 WARNING 278: Slow operation: {âbucketâ:âprofilesâ,âcidâ:â922D88E200000004/00000000CC379779/10d0826â,âcommandâ:âSUBDOC_MULTI_MUTATIONâ,âdurationâ:â13 sâ,âpacketâ: {âbodylenâ:447,âcasâ:0,âdatatypeâ:ârawâ,âextlenâ:0,âkeyâ:".NSAuHgG_mOysWsdmZtGFXQ",âkeylenâ:23,âmagicâ:âClientRequestâ,âopaqueâ:638061825,âopcodeâ:âSUBDOC_MULTI_MUTATIONâ,âvbucketâ:618}
,âpeerâ:"{âipâ:â10.168.104.34â,âportâ:23027}",âtraceâ:ârequest=2113661864500353:12579017 execute=2113661864500353:29 execute=2113661869268788:3369 execute=2113674443490934:26â,âworker_tidâ:140409681430272}
2022-05-06T01:51:16.915075+00:00 WARNING 278: Slow operation: {âbucketâ:âprofilesâ,âcidâ:â922D88E200000004/00000000CC379779/10d084fâ,âcommandâ:âGET_CLUSTER_CONFIGâ,âdurationâ:â12 sâ,âpacketâ: {âbodylenâ:0,âcasâ:0,âdatatypeâ:ârawâ,âextlenâ:0,âkeyâ:"",âkeylenâ:0,âmagicâ:âClientRequestâ,âopaqueâ:1325927681,âopcodeâ:âGET_CLUSTER_CONFIGâ,âvbucketâ:0}
,âpeerâ:"{âipâ:â10.168.104.34â,âportâ:23027}",âresponseâ:âSuccessâ,âtraceâ:ârequest=2113662086593708:12363373 execute=2113674449949489:18â,âworker_tidâ:140409681430272}
2022-05-06T02:46:48.799027+00:00 WARNING 206: Slow operation: {âbucketâ:âprofilesâ,âcidâ:âDD2D9FC700000004/000000006EF5156E/4300feeâ,âcommandâ:âSUBDOC_MULTI_MUTATIONâ,âdurationâ:â1742 msâ,âpacketâ: {âbodylenâ:581,âcasâ:0,âdatatypeâ:ârawâ,âextlenâ:0,âkeyâ:".OLb7xePfXaZ_xhrjaMg1oQ",âkeylenâ:23,âmagicâ:âClientRequestâ,âopaqueâ:3993972740,âopcodeâ:âSUBDOC_MULTI_MUTATIONâ,âvbucketâ:507}
,âpeerâ:"{âipâ:â10.168.104.37â,âportâ:21623}",âtraceâ:ârequest=2117004586707730:1741527 execute=2117004586707730:274 execute=2117004595922489:1900 execute=2117006328214807:20â,âworker_tidâ:140409681430272}
2022-05-06T02:46:48.800708+00:00 WARNING 206: Slow operation: {âbucketâ:âprofilesâ,âcidâ:âDD2D9FC700000004/000000006EF5156E/4301216â,âcommandâ:âGET_CLUSTER_CONFIGâ,âdurationâ:â970 msâ,âpacketâ: {âbodylenâ:0,âcasâ:0,âdatatypeâ:ârawâ,âextlenâ:0,âkeyâ:"",âkeylenâ:0,âmagicâ:âClientRequestâ,âopaqueâ:370290692,âopcodeâ:âGET_CLUSTER_CONFIGâ,âvbucketâ:0}
,âpeerâ:"{âipâ:â10.168.104.37â,âportâ:21623}",âresponseâ:âSuccessâ,âtraceâ:ârequest=2117005365845751:969758 execute=2117006335587993:16â,âworker_tidâ:140409681430272}
2022-05-06T02:47:34.723142+00:00 WARNING (No Engine) Slow runtime for âItem pager on vb:394â on thread NonIoPool0: 8144 ms