title: Realm Different Schema Version Error
body: <p>I use Realm in Android and it's useful. But gets these errors sometimes when app start:</p>
  
  <p><strong>Error-1:</strong></p>
  
  <pre><code>Exception io.realm.exceptions.RealmFileException: Too many open files () (/data/data/[REDACTED_DOMAIN_NAME]/files/e_app.realm) in /home/cc/repo/realm/release/realm/realm-library/src/main/cpp/io_realm_internal_SharedRealm.cpp line 91
  io.realm.internal.SharedRealm.nativeGetSharedRealm (SharedRealm.java)
  io.realm.internal.SharedRealm.&lt;init&gt; (SharedRealm.java:180)
  io.realm.internal.SharedRealm.getInstance (SharedRealm.java:227)
  io.realm.BaseRealm.&lt;init&gt; (BaseRealm.java:124)
  io.realm.BaseRealm.&lt;init&gt; (BaseRealm.java:93)
  io.realm.Realm.&lt;init&gt; (Realm.java:150)
  io.realm.Realm.createInstance (Realm.java:417)
  io.realm.RealmCache.doCreateRealmOrGetFromCache (RealmCache.java:348)
  io.realm.RealmCache.createRealmOrGetFromCache (RealmCache.java:281)
  io.realm.Realm.getDefaultInstance (Realm.java:325)
  com.app.android.dao.RealmEncryptionHelper.createEncryptedRealm (RealmEncryptionHelper.java:47)
  com.app.android.dao.RealmController.getRealm (RealmController.java:104)
  com.app.android.dao.RealmController$1.run (RealmController.java:48)
  java.lang.Thread.run (Thread.java:762)
  </code></pre>
  
  <p><strong>Error-2:</strong></p>
  
  <pre><code>Exception io.realm.exceptions.RealmError: Unrecoverable error. Too many open files in /home/cc/repo/realm/release/realm/realm-library/src/main/cpp/io_realm_internal_SharedRealm.cpp line 91
  io.realm.internal.SharedRealm.nativeGetSharedRealm ()
  io.realm.internal.SharedRealm.&lt;init&gt; ()
  io.realm.internal.SharedRealm.getInstance ()
  io.realm.internal.SharedRealm.getInstance ()
  io.realm.ca.b ()
  io.realm.ca.a ()
  io.realm.by.l ()
  com.app.android.dao.a.a ()
  com.app.android.MyApplication.e ()
  com.app.android.e.a.b ()
  com.app.android.e.a$1.onMessage ()
  okhttp3.internal.ws.RealWebSocket.onReadMessage ()
  okhttp3.internal.ws.WebSocketReader.readMessageFrame ()
  okhttp3.internal.ws.WebSocketReader.processNextFrame ()
  okhttp3.internal.ws.RealWebSocket.loopReader ()
  okhttp3.internal.ws.RealWebSocket$2.onResponse ()
  okhttp3.RealCall$AsyncCall.execute ()
  okhttp3.internal.NamedRunnable.run ()
  java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1112)
  java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:587)
  java.lang.Thread.run (Thread.java:818)
  </code></pre>
  
  <p><strong>Error-3:</strong></p>
  
  <pre><code>Exception java.lang.IllegalStateException: Realm at path '/data/data/[REDACTED_DOMAIN_NAME]/files/e_app.realm' already opened with different schema version.
  io.realm.internal.SharedRealm.nativeGetSharedRealm ()
  io.realm.internal.SharedRealm.&lt;init&gt; ()
  io.realm.internal.SharedRealm.getInstance ()
  io.realm.h.&lt;init&gt; ()
  io.realm.h.&lt;init&gt; ()
  io.realm.by.&lt;init&gt; ()
  io.realm.by.a ()
  io.realm.ca.b ()
  io.realm.ca.a ()
  io.realm.by.l ()
  com.app.android.dao.a.a ()
  com.app.android.dao.a$1.run ()
  java.lang.Thread.run (Thread.java:818)
  </code></pre>
  
  <p>I think these errors related each other. I don't get above errors every starting. But some devices gets this errors and I think it's not about related with devices.
  No changed Realm's schema version. Bu I had this error. </p>