# Running Dragonfly in Memcached mode doesn't support payloads \>~ 200 bytes?

**URL:** <https://dragonfly.discourse.group/t/running-dragonfly-in-memcached-mode-doesnt-support-payloads-200-bytes/109>\
**Category:** Dragonfly Technical\
**Created:** [August 29, 2023, 5:36pm UTC](https://dragonfly.discourse.group/t/running-dragonfly-in-memcached-mode-doesnt-support-payloads-200-bytes/109 "2023-08-29T17:36:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jester-warthog](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@jester-warthog](https://dragonfly.discourse.group/u/jester-warthog)\
**Post date:** [August 29, 2023, 5:36pm UTC](https://dragonfly.discourse.group/t/running-dragonfly-in-memcached-mode-doesnt-support-payloads-200-bytes/109/1 "2023-08-29T17:36:59Z")

</div>

We are trying to run dragonfly as a replacement for memcached. We are using the default configuration, only specifying the memcached port to turn on memcached mode. We are running it in Kubernetes.

When we go to write keys to Dragonfly, we end up with a problem where we cannot write keys more than about 200 bytes. (200 works, 256 does not, we played with some other numbers, I can do a binary search to find the exact number if necessary.

Upon further digging we see

```auto
hidden_info 12 dragonfly_connection.cc:354] Closed connection for peer hidden_ip_address
hidden_info 12 listener_interface.cc:203] sock[13] After HandleRequests

```

It looks like it is leaking io\_uring instances.  
`hidden_info 10 dragonfly_listener.cc:229] Opening connection 562`

It says we are opening a ton of connections but all we did was try to connect to it through a golang app sending one single key.

We also tried to run it with `--force_epoll` and the problem still persists:

```auto
hidden_info 9 listener_interface.cc:119] sock[14] Accepted hidden_info
hidden_info 9 dragonfly_listener.cc:288] CPU/NAPI for connection 14 is 6/0
hidden_info 9 epoll_proactor.cc:276] PRO[0] Fetched 1 cqes
hidden_info 9 listener_interface.cc:194] sock[14] Running connection
hidden_info 9 dragonfly_listener.cc:229] Opening connection 1
hidden_info 9 epoll_proactor.cc:276] PRO[0] Fetched 1 cqes
hidden_info 9 epoll_socket.cc:363] sock[14] Error system:103 on hidden_info
hidden_info 9 dragonfly_connection.cc:481] Before dispatch_fb.join()
hidden_info 9 dragonfly_connection.cc:483] After dispatch_fb.join()
hidden_info 9 dragonfly_connection.cc:354] Closed connection for peer hidden_info
hidden_info 9 listener_interface.cc:203] sock[14] After HandleRequests
hidden_info 9 dragonfly_listener.cc:256] Closing connection 1

```

We will spin up a github issue with more info if needed, I just figured I would start here to see if there was any idea of what was wrong. Thanks!

---

<div class="post-metadata">

**Author:** ![jester-warthog](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@jester-warthog](https://dragonfly.discourse.group/u/jester-warthog)\
**Post date:** [August 29, 2023, 5:43pm UTC](https://dragonfly.discourse.group/t/running-dragonfly-in-memcached-mode-doesnt-support-payloads-200-bytes/109/2 "2023-08-29T17:43:51Z")

</div>

The magic number seems to be:  
15 byte keys + 225 byte payload will break it.

I’m wondering if there is some metadata that gets it to 256 and there is some 256 byte limit somewhere by default?

---

<div class="post-metadata">

**Author:** ![jester-warthog](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@jester-warthog](https://dragonfly.discourse.group/u/jester-warthog)\
**Post date:** [August 29, 2023, 6:54pm UTC](https://dragonfly.discourse.group/t/running-dragonfly-in-memcached-mode-doesnt-support-payloads-200-bytes/109/3 "2023-08-29T18:54:13Z")

</div>

We posted a follow up github issue here: [https://github.com/dragonflydb/dragonfly/issues/1763](https://github.com/dragonflydb/dragonfly/issues/1763)

---

<div class="post-metadata">

**Author:** ![jester-warthog](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@jester-warthog](https://dragonfly.discourse.group/u/jester-warthog)\
**Post date:** [August 29, 2023, 7:28pm UTC](https://dragonfly.discourse.group/t/running-dragonfly-in-memcached-mode-doesnt-support-payloads-200-bytes/109/4 "2023-08-29T19:28:21Z")

</div>

Problem was already solved: [https://github.com/dragonflydb/dragonfly/pull/1745](https://github.com/dragonflydb/dragonfly/pull/1745)

---

<div class="post-metadata">

**Author:** ![inclusive-numbat](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@inclusive-numbat](https://dragonfly.discourse.group/u/inclusive-numbat)\
**Post date:** [August 30, 2023, 9:23pm UTC](https://dragonfly.discourse.group/t/running-dragonfly-in-memcached-mode-doesnt-support-payloads-200-bytes/109/5 "2023-08-30T21:23:14Z")

</div>

thank you for reporting this!
