hybrid-disk-cache icon indicating copy to clipboard operation
hybrid-disk-cache copied to clipboard

Server hangs on `no such file`

Open j3ll3nl opened this issue 3 years ago • 1 comments

When using Hydbrid disk cache in combination with next-boost sometimes we got currupt files ending up in the following error. I think we should catch this.

(node:67992) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/tmp/boost/5e/fe/cbc7e7aa02d9161d7897ac88571f.v'
    at Object.openSync (fs.js:462:3)
    at Object.readFileSync (fs.js:364:35)
    at Object.read (/Users/j/node_modules/hybrid-disk-cache/dist/utils.js:53:31)
    at Cache.get (/Users/j/node_modules/hybrid-disk-cache/dist/index.js:58:32)
    at Object.<anonymous> (/Users/j/node_modules/next-boost/dist/cache-manager.js:48:34)
    at Generator.next (<anonymous>)
    at /Users/j/node_modules/next-boost/dist/cache-manager.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/j/node_modules/next-boost/dist/cache-manager.js:4:12)
    at Object.serveCache (/Users/j/node_modules/next-boost/dist/cache-manager.js:35:12)

j3ll3nl avatar Sep 09 '21 07:09 j3ll3nl

Try to move the cache to somewhere else than the /tmp It's for test usage and files will get deleted by the system in some unmanageable manner.

rjyo avatar Sep 09 '21 07:09 rjyo