Key Value store with large data and local file system adopter taking forever to load #2722
Replies: 3 comments 6 replies
-
So you want to load 15gb of data to memory, while you have 4gb of RAM. Sounds like that is your issue, not much we can do about that. |
Beta Was this translation helpful? Give feedback.
-
Before we find a solution to this, I wanted to let you know there is an alternative storage client you can use locally, backed by sqlite, which shouldn't suffer from this problem. https://npmjs.com/package/@apify/storage-local You can pass that in the import { ApifyStorageLocal } from '@apify/storage-local';
await Actor.init({
storage: new ApifyStorageLocal(),
}); |
Beta Was this translation helpful? Give feedback.
-
@B4nan Thank you so much for work around. I tested it and it worked. I also created POC which can reproduce this behavior. 1 - Extract the attached file and do Thanks, |
Beta Was this translation helpful? Give feedback.
-
Which package is this bug report for? If unsure which one to select, leave blank
@crawlee/core
Issue description
1 - Create new project with local file system as storage driver
2 - Take Key Value store which has 150K+ keys and size around 15GB+
3 - Try to open that key value store. e.g. Actor.openKeyValueStore('name')
4 - You will see code will take forever on that line.
This works on small KVs. Ideally while opening KV, it should not try to load everything!
Code sample
Package version
3.11.5
Node.js version
18
Operating system
linux
Apify platform
I have tested this on the
next
releaseNo response
Other context
I am running this on server machine with 4GB memory and 200 GB disk
Beta Was this translation helpful? Give feedback.
All reactions