PietsmietApp / pietsmiet_android

STALE - Android browsing & notification app for the youtube group Pietsmiet
https://play.google.com/store/apps/details?id=de.pscom.pietsmiet
GNU General Public License v3.0
5 stars 1 forks source link

SqlException & OKHttpException - Opened too many files #85

Closed l3d00m closed 7 years ago

l3d00m commented 7 years ago
Exception android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 2062): Could not open database ################################################################# Error Code : 2062 (SQLITE_CANTOPEN_EMFILE) Caused By : Application has opened two many files. Maximum of available file descriptors in one process is 1024 in default. (unknown error (code 2062): Could not open database) #################################################################

Use one instance of DatabaseHelper instead of creating a new one each time to fix it: http://stackoverflow.com/a/36460895/4026792. Will be done in the feat/mvp branch

l3d00m commented 7 years ago

Same for okhttp EMFILE exception: Reuse retrofit instances instead of creating new ones each time

l3d00m commented 7 years ago

DB Helper fixed with https://github.com/l3d00m/pietsmiet_android/commit/1826ed97946f11f011b21bf41bbf3897241b0112