Mmap() failed: Out of memory size


(Mher) #1

io.realm.exceptions.RealmError: Unrecoverable error. mmap() failed: Out of memory size: 1073741824 offset: 0 in /Users/cm/Realm/realm-java-release/realm/realm-library/src/main/cpp/io_realm_internal_OsSharedRealm.cpp line 101
at io.realm.internal.OsSharedRealm.nativeGetSharedRealm(Native Method)
at io.realm.internal.OsSharedRealm.(OsSharedRealm.java:171)
at io.realm.internal.OsSharedRealm.getInstance(OsSharedRealm.java:241)
at io.realm.internal.OsSharedRealm.getInstance(OsSharedRealm.java:231)
at io.realm.RealmCache.doCreateRealmOrGetFromCache(RealmCache.java:332)
at io.realm.RealmCache.createRealmOrGetFromCache(RealmCache.java:285)
at io.realm.Realm.getDefaultInstance(Realm.java:407)

minSdkVersion 22
targetSdkVersion 28
classpath “io.realm:realm-gradle-plugin:6.0.0”

a database of 1GB, even can’t delete data because you get this error.
Please help to solve the problem :frowning:

I have many places I read about this problem, basically there was a transaction, but I have an error voznikaet immediately after initialisatie, that is, no other transaction no.


(Brian Munkholm) #2

@mherarsh It best to report bugs like this at github realm/realm-java. That said, it’s hard to help without a bit more context and details about how you ended up with such a big file, and if that’s expected. You can try opening the file with Realm Studio in case you want to delete data from it and compact it again.


(Mher) #3

Hello, thanks for the feedback! to get this database from the phone I had to root the device to take out the base, then I got the data on the PC, but it’s not good, because if it’s a database issue that urgently needs to come up with something!