PHP SDK warnings (EINVAL and NETWORK_ERROR)


#1

Hi guys,
I’m currently working on improving application performance by reducing number of connections using one get/upsert (batching) instead of multiple. My solution is working pretty well but I’ve noticed many warnings emited by PHP SDK - see below.

[cb,WARN] (server L:263 I:511330516) couchbase:11210 (CTX=0x56284ebfd2c0,memcached,SRV=0x56284ead40a0,IX=0) Received server error EINVAL (0x4) on packet: OP=0x0, RC=0x4, SEQ=1212
[cb,WARN] (lcbio L:112 I:511330516) Translating errno=0, lcb=0x2d to NETWORK_ERROR
[cb,WARN] (server L:900 I:511330516) couchbase:11210 (CTX=0x56284ebfd2c0,memcached,SRV=0x56284ead40a0,IX=0) Got socket error LCB_NETWORK_ERROR (0x10)

Do you know what might be the reason or where to search it? Thanks in advance!


#2

It seems like the server rejects the GET (opcode=0x00) and closes the socket. Could you check the server memcached logs at that point of time? Likely it will more information about the problem.


#3

Hi @avsej, thanks for the reply.
So I checked the logs, I hope it’s readable enough…

2018-09-17T14:30:20.056819Z NOTICE 77: HELO [{“a”:“libcouchbase/2.9.3 (Linux-4.14.39-0-vanilla; x86_64; GNU 6.4.0) PCBC/2.5.0 (PHP/7.2.9 NTS)”,“i”:“0000000049d44c95/b38df06d0dddba21”}] XATTR, Select Bucket, XERROR, TCP NODELAY [ 172.18.0.3:60684 - 172.18.0.4:11210 (not authenticated) ]
2018-09-17T14:30:20.058391Z NOTICE 78: HELO [{“a”:“libcouchbase/2.9.3 (Linux-4.14.39-0-vanilla; x86_64; GNU 6.4.0) PCBC/2.5.0 (PHP/7.2.9 NTS)”,“i”:“0000000053ebc8dd/6f0f467fe4bbacac”}] XATTR, Select Bucket, XERROR, TCP NODELAY [ 172.18.0.3:60686 - 172.18.0.4:11210 (not authenticated) ]
2018-09-17T14:30:20.059748Z NOTICE 80: HELO [{“a”:“libcouchbase/2.9.3 (Linux-4.14.39-0-vanilla; x86_64; GNU 6.4.0) PCBC/2.5.0 (PHP/7.2.9 NTS)”,“i”:“0000000046b2ae70/9d726fd090570c1d”}] XATTR, Select Bucket, XERROR, TCP NODELAY [ 172.18.0.3:60688 - 172.18.0.4:11210 (not authenticated) ]
2018-09-17T14:30:20.061064Z NOTICE 81: HELO [{“a”:“libcouchbase/2.9.3 (Linux-4.14.39-0-vanilla; x86_64; GNU 6.4.0) PCBC/2.5.0 (PHP/7.2.9 NTS)”,“i”:“000000002f908ca3/800feac7537debee”}] XATTR, Select Bucket, XERROR, TCP NODELAY [ 172.18.0.3:60690 - 172.18.0.4:11210 (not authenticated) ]
2018-09-17T14:30:20.062364Z NOTICE 82: HELO [{“a”:“libcouchbase/2.9.3 (Linux-4.14.39-0-vanilla; x86_64; GNU 6.4.0) PCBC/2.5.0 (PHP/7.2.9 NTS)”,“i”:“00000000e0b22d32/745badb8dbef423b”}] XATTR, Select Bucket, XERROR, TCP NODELAY [ 172.18.0.3:60692 - 172.18.0.4:11210 (not authenticated) ]
2018-09-17T14:30:24.049050Z NOTICE 78: Protocol error (opcode 00), close connection
2018-09-17T14:30:24.066546Z NOTICE 78: HELO [{“a”:“libcouchbase/2.9.3 (Linux-4.14.39-0-vanilla; x86_64; GNU 6.4.0) PCBC/2.5.0 (PHP/7.2.9 NTS)”,“i”:“0000000053ebc8dd/594cd37cb5b1a203”}] XATTR, Select Bucket, XERROR, TCP NODELAY [ 172.18.0.3:60720 - 172.18.0.4:11210 (not authenticated) ]

What does it mean? It’s not working when I’m using get with single key and upsert with single key-value. It only persists now, when I’m improving the connections.

By the way first 2 warnings (from my first post) are caused by get with multiple ids. Third warning is caused by persistence layer so the upsert method with multiple keys (and values). I can share my code if you want to and also include my env setup details like CB version etc… Just let me know.

Appreciate your help! :slight_smile:


#4

Is it possible to reproduce the issue and capture the TCP dump? If you cannot run tcp dump in your environment, you can enable TCP dump feature built into libcouchbase, but it will require to remove current libcouchbase and install modified:

wget https://github.com/couchbase/libcouchbase/releases/download/2.9.3/libcouchbase-2.9.3.tar.gz
tar zxf libcouchbase-2.9.3.tar.gz
mkdir libcouchbase-2.9.3/build
cd libcouchbase-2.9.3/build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DLCB_DUMP_PACKETS=1 ..
make
sudo make install

Once you will do that and if your php.ini has couchbase.log_level=TRACE, you will see base64-encoded packets the library receives and sends. For example:

[cb,TRAC] (ioctx L:128 I:2714025545) <localhost:11210> (CTX=0x55cdd3adc940,sasl) pkt,snd: size=64, gP4AAAAAAAAAAAACAAAAAAAAAAAAAAAAAAGAIAAAAAAAAAAAAAAAAAAAAAAAAAAA
[cb,TRAC] (ioctx L:68 I:2714025545) <localhost:11210> (CTX=0x55cdd3adc940,sasl) pkt,rcv: size=13640, GP4DAAABAAAAACfgAAAAAAAAAAAAAAAAAgADewogICAgInZlcnNpb24iOiAxLAogICAgInJldmlzaW9uIjogMSwKICAgICJlcnJvcnMiOiB7CiAgICAgICAgIjAiOiB7CiAgICAgICAgICAgICJuYW1lIjogIlNVQ0NFU1MiLAogICAgICAgICAgICAiZGVzYyI6ICJTdWNjZXNzIiwKICAgICAgICAgICAgImF0dHJzIjogWwogICAgICAgICAgICAgICAgInN1Y2Nlc3MiCiAgICAgICAgICAgIF0KICAgICAgICB9LAogICAgICAgICIxIjogewogICAgICAgICAgICAibmFtZSI6ICJLRVlfRU5PRU5UIiwKICAgICAgICAgICAgImRlc2MiOiAiTm90IEZvdW5kIiwKICAgICAgICAgICAgImF0dHJzIjogWwogICAgICAgICAgICAgICAgIml0ZW0tb25seSIKICAgICAgICAgICAgXQogICAgICAgIH0sCiAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICJuYW1lIjogIktFWV9FRVhJU1RTIiwKICAgICAgICAgICAgImRlc2MiOiAia2V5IGFscmVhZHkgZXhpc3RzLCBvciBDQVMgbWlzbWF0Y2giLAogICAgICAgICAgICAiYXR0cnMiOiBbCiAgICAgICAgICAgICAgICAiaXRlbS1vbmx5IgogICAgICAgICAgICBdCiAgICAgICAgfSwKICAgICAgICAiMyI6IHsKICAgICAgICAgICAgIm5hbWUiOiAiRTJCSUciLAogICAgICAgICAgICAiZGVzYyI6ICJWYWx1ZSBpcyB0b28gYmlnIiwKICAgICAgICAgICAgImF0dHJzIjogWwogICAgICAgIC
[cb,TRAC] (ioctx L:68 I:2714025545) <localhost:11210> (CTX=0x55cdd3adc940,sasl) pkt,rcv: size=92, GCADAAAAAAAAAAAtAAAAAAAAAAAAAAAAAgAFU0NSQU0tU0hBNTEyIFNDUkFNLVNIQTI1NiBTQ1JBTS1TSEExIFBMQUlO

That basically enough information to figure out what might be wrong/strange in GET request rejected by the server. To visualize the contents you might use simple script which will decode packets and strip the rest of the logs (https://github.com/couchbase/libcouchbase/blob/master/tools/extract-packets.rb)

php ~/test.php 2>&1 | sed 's/TRAC/TRACE/' | ruby tools/extract-packets.rb

For the lines above it will output:

> localhost:11210 CTX=0x55886fd8f980,sasl sent 48 bytes
>          +-------------------------------------------------------------------------------------------------+
>          |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
> +--------+-------------------------------------------------------------------------------------------------+--------------------------------+
> |00000000| 80 fe 00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 01 80 20 00 00 00 00 |........................... ....|
> |00000020| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00                                                 |................                |
> +--------+-------------------------------------------------------------------------------------------------+--------------------------------+
< localhost:11210 CTX=0x55886fd8f980,sasl received 691 bytes
<          +-------------------------------------------------------------------------------------------------+
<          |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
< +--------+-------------------------------------------------------------------------------------------------+--------------------------------+
< |00000000| 18 fe 03 00 00 01 00 00 00 00 27 e0 00 00 00 00 00 00 00 00 00 00 00 00 02 00 03 7b 0a 20 20 20 |..........'................{.   |
< |00000020| 20 22 76 65 72 73 69 6f 6e 22 3a 20 31 2c 0a 20 20 20 20 22 72 65 76 69 73 69 6f 6e 22 3a 20 31 | "version": 1,.    "revision": 1|
< |00000040| 2c 0a 20 20 20 20 22 65 72 72 6f 72 73 22 3a 20 7b 0a 20 20 20 20 20 20 20 20 22 30 22 3a 20 7b |,.    "errors": {.        "0": {|
< |00000060| 0a 20 20 20 20 20 20 20 20 20 20 20 20 22 6e 61 6d 65 22 3a 20 22 53 55 43 43 45 53 53 22 2c 0a |.            "name": "SUCCESS",.|
< |00000080| 20 20 20 20 20 20 20 20 20 20 20 20 22 64 65 73 63 22 3a 20 22 53 75 63 63 65 73 73 22 2c 0a 20 |            "desc": "Success",. |
< |000000a0| 20 20 20 20 20 20 20 20 20 20 20 22 61 74 74 72 73 22 3a 20 5b 0a 20 20 20 20 20 20 20 20 20 20 |           "attrs": [.          |
< |000000c0| 20 20 20 20 20 20 22 73 75 63 63 65 73 73 22 0a 20 20 20 20 20 20 20 20 20 20 20 20 5d 0a 20 20 |      "success".            ].  |
< |000000e0| 20 20 20 20 20 20 7d 2c 0a 20 20 20 20 20 20 20 20 22 31 22 3a 20 7b 0a 20 20 20 20 20 20 20 20 |      },.        "1": {.        |
< |00000100| 20 20 20 20 22 6e 61 6d 65 22 3a 20 22 4b 45 59 5f 45 4e 4f 45 4e 54 22 2c 0a 20 20 20 20 20 20 |    "name": "KEY_ENOENT",.      |
< |00000120| 20 20 20 20 20 20 22 64 65 73 63 22 3a 20 22 4e 6f 74 20 46 6f 75 6e 64 22 2c 0a 20 20 20 20 20 |      "desc": "Not Found",.     |
< |00000140| 20 20 20 20 20 20 20 22 61 74 74 72 73 22 3a 20 5b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |       "attrs": [.              |
< |00000160| 20 20 22 69 74 65 6d 2d 6f 6e 6c 79 22 0a 20 20 20 20 20 20 20 20 20 20 20 20 5d 0a 20 20 20 20 |  "item-only".            ].    |
< |00000180| 20 20 20 20 7d 2c 0a 20 20 20 20 20 20 20 20 22 32 22 3a 20 7b 0a 20 20 20 20 20 20 20 20 20 20 |    },.        "2": {.          |
< |000001a0| 20 20 22 6e 61 6d 65 22 3a 20 22 4b 45 59 5f 45 45 58 49 53 54 53 22 2c 0a 20 20 20 20 20 20 20 |  "name": "KEY_EEXISTS",.       |
< |000001c0| 20 20 20 20 20 22 64 65 73 63 22 3a 20 22 6b 65 79 20 61 6c 72 65 61 64 79 20 65 78 69 73 74 73 |     "desc": "key already exists|
< |000001e0| 2c 20 6f 72 20 43 41 53 20 6d 69 73 6d 61 74 63 68 22 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 |, or CAS mismatch",.            |
< |00000200| 22 61 74 74 72 73 22 3a 20 5b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 69 74 65 6d |"attrs": [.                "item|
< |00000220| 2d 6f 6e 6c 79 22 0a 20 20 20 20 20 20 20 20 20 20 20 20 5d 0a 20 20 20 20 20 20 20 20 7d 2c 0a |-only".            ].        },.|
< |00000240| 20 20 20 20 20 20 20 20 22 33 22 3a 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 22 6e 61 6d 65 |        "3": {.            "name|
< |00000260| 22 3a 20 22 45 32 42 49 47 22 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 22 64 65 73 63 22 3a 20 |": "E2BIG",.            "desc": |
< |00000280| 22 56 61 6c 75 65 20 69 73 20 74 6f 6f 20 62 69 67 22 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 |"Value is too big",.            |
< |000002a0| 22 61 74 74 72 73 22 3a 20 5b 0a 20 20 20 20 20 20 20 20                                        |"attrs": [.                     |
< +--------+-------------------------------------------------------------------------------------------------+--------------------------------+
< localhost:11210 CTX=0x55886fd8f980,sasl received 69 bytes
<          +-------------------------------------------------------------------------------------------------+
<          |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
< +--------+-------------------------------------------------------------------------------------------------+--------------------------------+
< |00000000| 18 20 03 00 00 00 00 00 00 00 00 2d 00 00 00 00 00 00 00 00 00 00 00 00 02 00 04 53 43 52 41 4d |. .........-...............SCRAM|
< |00000020| 2d 53 48 41 35 31 32 20 53 43 52 41 4d 2d 53 48 41 32 35 36 20 53 43 52 41 4d 2d 53 48 41 31 20 |-SHA512 SCRAM-SHA256 SCRAM-SHA1 |
< |00000040| 50 4c 41 49 4e                                                                                  |PLAIN                           |
< +--------+-------------------------------------------------------------------------------------------------+--------------------------------+

#5

Hi @avsej, I did what you asked for. I decided to use Wireshark because of my docker setup.
I was able to catch similar output but everything looks good. What should I look for exactly?


#6

Oh, wait! I found something.

{
"version": 1,
"revision": 1,
"errors": {
    "0": {
        "name": "SUCCESS",
        "desc": "Success",
        "attrs": [
            "success"
        ]
    },
    "1": {
        "name": "KEY_ENOENT",
        "desc": "Not Found",
        "attrs": [
            "item-only"
        ]
    },
    "2": {
        "name": "KEY_EEXISTS",
        "desc": "key already exists, or CAS mismatch",
        "attrs": [
            "item-only"
        ]
    },
    "3": {
        "name": "E2BIG",
        "desc": "Value is too big",
        "attrs": [
            "item-only",
            "invalid-input"
        ]
    },
    "4": {
        "name": "EINVAL",
        "desc": "Invalid packet",
        "attrs": [
            "internal",
            "invalid-input"
        ]
    },
    "5": {
        "name": "NOT_STORED",
        "desc": "Not Stored",
        "attrs": [
            "internal",
            "item-only"
        ]
    },
    "6": {
        "name": "DELTA_BADVAL",
        "desc": "Existing document not a number",
        "attrs": [
            "item-only",
            "invalid-input"
        ]
    },
    "7": {
        "name": "NOT_MY_VBUCKET",
        "desc": "Server does not know about this vBucket",
        "attrs": [
            "fetch-config",
            "invalid-input"
        ]
    },
    "8": {
        "name": "NO_BUCKET",
        "desc": "Not connected to any bucket",
        "attrs": [
            "conn-state-invalidated"
        ]
    },
    "9": {
        "name": "LOCKED",
        "desc": "Requested resource is locked",
        "attrs": [
            "item-locked",
            "item-only",
            "retry-now"
        ]
    },
    "1f": {
        "name": "AUTH_STALE",
        "desc": "Reauthentication required",
        "attrs": [
            "conn-state-invalidated",
            "auth"
        ]
    },
    "20": {
        "name": "AUTH_ERROR",
        "desc": "Authentication failed",
        "attrs": [
            "conn-state-invalidated",
            "auth"
        ]
    },
    "21": {
        "name": "AUTH_CONTINUE",
        "desc": "Continue authentication processs",
        "attrs": [
            "special-handling"
        ]
    },
    "22": {
        "name": "ERANGE",
        "desc": "Invalid range requested",
        "attrs": [
            "invalid-input"
        ]
    },
    "23": {
        "name": "ROLLBACK",
        "desc": "Rollback",
        "attrs": [
            "dcp",
            "special-handling"
        ]
    },
    "24": {
        "name": "EACCESS",
        "desc": "Not authorized for command",
        "attrs": [
            "support"
        ]
    },
    "25": {
        "name": "NOT_INITIALIZED",
        "desc": "Server not initialized",
        "attrs": [
            "conn-state-invalidated"
        ]
    },
    "81": {
        "name": "UNKNOWN_COMMAND",
        "desc": "Unknown command. Maybe a newer server version knows about it",
        "attrs": [
            "support"
        ]
    },
    "82": {
        "name": "ENOMEM",
        "desc": "No memory available to store item. Add memory or remove some items and try later",
        "attrs": [
            "temp",
            "retry-later"
        ]
    },
    "83": {
        "name": "NOT_SUPPORTED",
        "desc": "Command not supported with current bucket type/configuration",
        "attrs": [
            "support"
        ]
    },
    "84": {
        "name": "EINTERNAL",
        "desc": "Internal error. Reconnect recommended",
        "attrs": [
            "internal",
            "conn-state-invalidated"
        ]
    },
    "85": {
        "name": "EBUSY",
        "desc": "Busy, try again",
        "attrs": [
            "temp",
            "retry-now"
        ]
    },
    "86": {
        "name": "ETMPFAIL",
        "desc": "Temporary failure. Try again",
        "attrs": [
            "temp",
            "retry-now"
        ]
    },
    "87": {
        "name": "XATTR_EINVAL",
        "desc": "Invalid extended attribute",
        "attrs": [
            "invalid-input"
        ]
    },
    "88": {
        "name": "UNKNOWN_COLLECTION",
        "desc": "Unknown collection (or no collection) in the key.",
        "attrs": [
            "invalid-input"
        ]
    },
    "c0": {
        "name": "SUBDOC_PATH_ENOENT",
        "desc": "Subdoc: Path not found in document",
        "attrs": [
            "subdoc",
            "item-only"
        ]
    },
    "c1": {
        "name": "SUBDOC_PATH_MISMATCH",
        "desc": "Subdoc: Path and document disagree on structure",
        "attrs": [
            "subdoc",
            "item-only"
        ]
    },
    "c2": {
        "name": "SUBDOC_PATH_EINVAL",
        "desc": "Subdoc: Invalid path (bad syntax or unacceptable semantics for command",
        "attrs": [
            "subdoc",
            "invalid-input"
        ]
    },
    "c3": {
        "name": "SUBDOC_PATH_E2BIG",
        "desc": "Subdoc: Path size exceeds limit",
        "attrs": [
            "subdoc",
            "invalid-input"
        ]
    },
    "c4": {
        "name": "SUBDOC_PATH_E2DEEP",
        "desc": "Subdoc: Path is too deep to be parsed",
        "attrs": [
            "subdoc",
            "invalid-input"
        ]
    },
    "c5": {
        "name": "SUBDOC_VALUE_CANTINSERT",
        "desc": "Subdoc: Value invalid for insertion",
        "attrs": [
            "subdoc",
            "invalid-input"
        ]
    },
    "c6": {
        "name": "SUBDOC_DOC_NOTJSON",
        "desc": "Subdoc: Document not JSON",
        "attrs": [
            "subdoc",
            "item-only"
        ]
    },
    "c7": {
        "name": "SUBDOC_NUM_ERANGE",
        "desc": "Subdoc: Existing numeric value is not within range",
        "attrs": [
            "subdoc",
            "item-only"
        ]
    },
    "c8": {
        "name": "SUBDOC_DELTA_EINVAL",
        "desc": "Subdoc: Invalid value passed for delta (out of range, or not an integer",
        "attrs": [
            "subdoc",
            "item-only"
        ]
    },
    "c9": {
        "name": "SUBDOC_PATH_EEXISTS",
        "desc": "Subdoc: Path already exists",
        "attrs": [
            "subdoc",
            "item-only"
        ]
    },
    "ca": {
        "name": "SUBDOC_VALUE_ETOODEEP",
        "desc": "Subdoc: Value is too deep, or would make the document too deep",
        "attrs": [
            "subdoc",
            "invalid-input",
            "item-only"
        ]
    },
    "cb": {
        "name": "SUBDOC_INVALID_COMBO",
        "desc": "Subdoc: Lookup and mutation commands found within single packet",
        "attrs": [
            "subdoc",
            "invalid-input"
        ]
    },
    "cc": {
        "name": "SUBDOC_MULTI_PATH_FAILURE",
        "desc": "Subdoc: Some (or all) commands failed. Inspect payload for details",
        "attrs": [
            "subdoc",
            "special-handling"
        ]
    },
    "cd": {
        "name": "SUBDOC_SUCCESS_DELETED",
        "desc": "Subdoc: Success, but the affected document was (and still is) deleted",
        "attrs": [
            "item-deleted",
            "success",
            "subdoc"
        ]
    },
    "ce": {
        "name": "SUBDOC_XATTR_INVALID_FLAG_COMBO",
        "desc": "Subdoc: The flag combination doesn't make any sense",
        "attrs": [
            "subdoc",
            "invalid-input"
        ]
    },
    "cf": {
        "name": "SUBDOC_XATTR_INVALID_KEY_COMBO",
        "desc": "Subdoc: The key combination of the xattrs is not allowed",
        "attrs": [
            "subdoc",
            "invalid-input"
        ]
    },
    "d0": {
        "name": "SUBDOC_XATTR_UNKNOWN_MACRO",
        "desc": "Subdoc: The server don't know about the specified macro",
        "attrs": [
            "subdoc",
            "invalid-input"
        ]
    },
    "d1": {
        "name": "SUBDOC_XATTR_UNKNOWN_VATTR",
        "desc": "Subdoc: The server don't know about the specified virtual attribute",
        "attrs": [
            "subdoc",
            "invalid-input"
        ]
    },
    "d2": {
        "name": "SUBDOC_XATTR_CANT_MODIFY_VATTR",
        "desc": "Subdoc: Can't modify virtual attributes",
        "attrs": [
            "subdoc",
            "invalid-input"
        ]
    },
    "d3": {
        "name": "SUBDOC_MULTI_PATH_FAILURE_DELETED",
        "desc": "Subdoc: One or more paths in a multi-path command failed on a deleted document",
        "attrs": [
            "item-deleted",
            "subdoc",
            "special-handling"
        ]
    },
    "d4": {
        "name": "SUBDOC_INVALID_XATTR_ORDER",
        "desc": "Subdoc: Invalid XATTR order (xattrs should come first)",
        "attrs": [
            "subdoc",
            "invalid-input"
        ]
    }
}

}


#7

This is just a error map reply from the server.

Are you saying that you run the wireshark to traffic from docker container and still see something like this?

[cb,WARN] (server L:263 I:511330516) couchbase:11210 (CTX=0x56284ebfd2c0,memcached,SRV=0x56284ead40a0,IX=0) 
  Received server error EINVAL (0x4) on packet: OP=0x0, RC=0x4, SEQ=1212

There is an useful information here you can use to configure your wireshark filter: SEQ=1212. You can turn it into wireshark filter like this:

couchbase.opaque == 1212

If this filter will return something, could you export result as text (or pcapng file) and post it here?


#8

I just managed to solve 1 out of 3 issues (read related - EINVAL). It came out my application was doing some weird stuff with references. When I dumped set of keys that is being passed to get() function I saw:


string(20) “a-1”
[85]=>
string(20) “b-2”
[86]=>
string(20) “c-3”
[87]=>
&string(20) “d-4”

I changed the code to get rid of references and it started working.
I also checked persisting layer just a second ago. Good news - started working without errors/warnings. So stupid mistake.


#9

It looks like the issue was on my end. Thanks for your time @avsej and all the tips. I managed to dig into the Couchbase a little bit more than usual which is good investment for the future :smiley:
By the way… you can consider creating separate functions for batching operations in SDK. I don’t like using upsert() with multiple keys in the way it is.


#10

Thanks for the feedback. We are planning to revisit APIs in 3.x release, and batching will be covered and improved there.


#11

That’s very good! I use Couchbase since 4.0 beta and you’re doing a great job out there. Keep it that way haha! :wink: