Closed gogoout closed 2 years ago
I tried the latest version (2.1.0-beta2) it still can be reproduce on my application. But the error now can be catched by a try catch. And our automatic retry will still have the save error.
warn: Error in promise: Cannot set property '26344' of undefined, will retry executing it, left chance [1] times
warn: Error in promise: Cannot set property '26351' of undefined, will retry executing it, left chance [0] times
warn: Failed in retrying promise for 2 times: Cannot set property '26351' of undefined
That's a big cache! The problem is that weak-lru-cache uses 16-bit encoding of the LRU positions (as part of an integer with other flags/bits), so within the four LRUs, that yields a maximum size cache size of 256K. Of course, this limit should actually be checked/reported. And I think I can probably squeeze in a few more bits to permit larger caches.
Thanks for the clarification, I think checking this and maybe document it is good enough. Thanks.
Should be fixed in beta 3.
No longer reproducible under the beta3, no error message as well.
Hi, I noticed crash when I manually set the cacheSize to be something like 500_000. The crash is very reliable to reproduce in the application. The log is like following
However, I wasn't unable to reproduce this crash in a minimal setup (which use the same cacheSize and same lmdb config). I also noticed when I set the cache size lower like the default
30_000
, the problem goes away.My lmdb option is like this:
Sorry can't provide more information. Do you have any idea what may happened? My version is
2.0.0-beta4
I'll see if I can still reproduce this on the latest version