Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catbox catbox-memory throws an error but it is not handled properly #4484

Closed
Ashik155 opened this issue Mar 8, 2024 · 1 comment
Closed
Labels
support Questions, discussions, and general support

Comments

@Ashik155
Copy link

Ashik155 commented Mar 8, 2024

Runtime

node

Runtime version

14.15

Module version

catbox - 10.2.3, catbox-memory 4.1.1, hapi 18. 4.0

Used with

catbox, catbox-memory

Any other relevant information

going down the stacktrace, the implementatio, from catbox-memory identifies the cache limit size, but doesn't handle it, and upstream all the way to catbox itself it's not handled, nor in the hapi request cycle

Cache size limit reached, stack: Error: Cache size limit reached\n at module.exports.internals.Connection.set (/opt/bba/server/node_modules/@hapi/catbox-memory/lib/index.js:184:19)\n at module.exports.set (/opt/bba/server/node_modules/@hapi/catbox/lib/client.js:91:31)\n at module.exports.internals.Policy.set (/opt/bba/server/node_modules/@hapi/catbox/lib/policy.js:298:31)\n at internals.onPreResponse (/opt/bba/server/node_modules/@hapi/yar/lib/index.js:307:17)\n at async module.exports.internals.Manager.execute (/opt/bba/server/node_modules/@hapi/hapi/lib/toolkit.js:45:28)\n at async Request._invoke (/opt/bba/server/node_modules/@hapi/hapi/lib/request.js:339:30)\n at async Request._postCycle (/opt/bba/server/node_modules/@hapi/hapi/lib/request.js:402:32)\n at async Request._reply (/opt/bba/server/node_modules/@hapi/hapi/lib/request.js:381:9)\n"}

How can we help?

how can the this be resolved or error can be handled.

`const serverDev = Hapi.server({
debug: { request: ['error', 'request', 'response'] },
host:
port:
routes: {
cors: {

        ],
        //headers: ["Accept", "Content-Type"],
        //additionalHeaders: ["X-Requested-With"],
    },
    validate: {
        failAction: errorHandler.handleError,
    },
    timeout: {
        server: 60000 * 2, // ms
        socket: 60000 * 3, // ms
    },
},
cache: {
    name: '_default_',
    provider: {
        constructor: CatboxMemory,
        options: {
            maxByteSize: 524288000,
        },
    },
},

});`

@Ashik155 Ashik155 added the support Questions, discussions, and general support label Mar 8, 2024
@Marsup
Copy link
Contributor

Marsup commented Mar 11, 2024

Dupe of hapijs/catbox-memory#89.

@Marsup Marsup closed this as completed Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Questions, discussions, and general support
Projects
None yet
Development

No branches or pull requests

2 participants