core icon indicating copy to clipboard operation
core copied to clipboard

[Admin Console] "Too many API requests by single worker invocation." when opening large cache

Open TheAlexLichter opened this issue 1 year ago • 2 comments

Describe the bug When opening the _ group with > 1k cached entries, no entries are shown because the console does too many API request in a single worker call

Steps to reproduce Steps to reproduce the behavior:

  1. Have a cache with > 1k entries (I suppose)
  2. Click on Cache in the sidebare
  3. Try to open the group
  4. See No items
image image image

Expected behavior

Working overview

TheAlexLichter avatar Jul 31 '24 13:07 TheAlexLichter

Damn, what do you do with so many cache entries 😂

The issue comes from https://github.com/nuxt-hub/core/blob/91a1d97436bd1f311c0baeff0e2d40f6b85f0a07/src/runtime/cache/server/api/_hub/cache/%5B...key%5D.get.ts#L29-L50

I think we need to start implementing a pagination, but quite tricky with KV.

atinux avatar Aug 01 '24 10:08 atinux

Damn, what do you do with so many cache entries 😂

The issue comes from

https://github.com/nuxt-hub/core/blob/91a1d97436bd1f311c0baeff0e2d40f6b85f0a07/src/runtime/cache/server/api/_hub/cache/%5B...key%5D.get.ts#L29-L50

I think we need to start implementing a pagination, but quite tricky with KV.

I have lots of static content from third party APIs which can stay in the cache 👀 But giving easier cache names helped already :P

Yeah, that's a big issue, pagination is a bit meh, though the CF API should allow it at least somehow.

TheAlexLichter avatar Aug 01 '24 11:08 TheAlexLichter