Ionic Storage fails to save a large amount of data

I am using ionic storage to save a large amount of data.
I have got 33158 records of customer details and each record has 2-3 KB data.
Ionic storage fails to save 33158 records and it does not show any errors.
My app just hangs up while saving.

Following plugins are used for my app.
@ionic/storage”: “^2.1.3”,
“cordova-sqlite-storage”: “^2.1.3”,

Any solutions will be much appreciated.

hi i know this is a very old post but were you able to find a solution for this? I’m experiencing the same issue even with the latest version. But on certain devices. Thanks

1 Like

I have not found a solution yet. but there is a work around. you need to save maximum 10000 records at a time. So divide your records by 10000 and then save them one by one batch.

Thanks for the response. In fact I did something similar after I posted the message online but in my case it had to be around 2000 records in a single key. I guess it depends on the size of a single record.

So I had to use multiple keys in my solution when reading I combined them all.

Did you do it on a single key? How did append the data on the 2nd batch when writing to the data.


yes that is correct. I forgot that you need to use a separate key. I am using this one now:

Thanks, yes I have used that in other projects but I wanted to avoid using an extra plugin if possible. Anyway it’s now clear that there are some limitations so you need to choose the storage option depending on your requirements. Thanks very much for your response.