realm-java icon indicating copy to clipboard operation
realm-java copied to clipboard

How many storage data limit in Realm?

Open koz01 opened this issue 10 years ago • 7 comments

I'm developing Stock distribution system with android native application using realm database.My application is data synchronization with ERP Server in daily. Data Storage size is 720MB.Now, the problem is out-of-memory error.How can i do. May i know how limit data storage size in realm..

Thank..

koz01 avatar May 28 '16 06:05 koz01

I think your problem isn't realm specific. I think you shouldn't have all 720 MB data in memory when you're synchronizing.

Zhuinden avatar May 28 '16 13:05 Zhuinden

Realm has limitation on a single String's length or byte[]'s size stored, but no limitation on how much data totally stored. It only depends on the disk space.

Please consider what @Zhuinden commented, don't put all data in memory and store it. You might need to commit multiple Realm transactions when store all the data part by part.

beeender avatar May 30 '16 03:05 beeender

It looks like this question has been answered. I will now close it. Please let us know if you need more informations! :)

emanuelez avatar Jun 06 '16 08:06 emanuelez

So what the max String's length or byte[]'s size in realm android? And how can I store a string which exceeds this limit?

oligazar avatar Mar 24 '17 08:03 oligazar

It is 16 MB currently. If you want to store something bigger than that you will need to split it into multiple chuncks (fields).

cmelchior avatar Mar 24 '17 08:03 cmelchior

How to store/extract a video using realm?

BsVishnu515 avatar Mar 05 '18 09:03 BsVishnu515

If your video fits into 16 MB, then you can store it as a byte[]. Otherwise, store an URI to it.

Zhuinden avatar Mar 05 '18 11:03 Zhuinden