Skip to content
Advertisement

FATAL ERROR: v8::Object::SetInternalField() Internal field out of bounds on Node js using node-cache

I have a api export with a lot of data so I tried to used the node-cache so the api will be faster since take more than 2 min to get the data, I am new on this so I found the follow code: Notes: env node js/express

const NodeCache = require("node-cache");
const axios = require('axios');
const myCache = new NodeCache({stdTTL:100000})
 axios.get('http://localhost:5000/test/example)
        .then(function (response) {
            console.log(response)
            myCache.set("exampleCache",response,10000);
            res.send(response)

Any suggestion or recommend will be great!

Advertisement

Answer

The solution was using a buffer but since we had to many data, the increase the memory from the db was the solution

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement