locked
[NativeCrypto] AppData::create pipe(2) failed: Too many open files RRS feed

  • Question

  • User143588 posted

    Hi,

    We are facing frequent crashes on lollipop devices.

    Please find the log below

    [SQLiteLog] (28) failed to open "/data/data/avc.droid/files/avc.sqlite" with flag (131138) and modet (0) due to error (24) [SQLiteLog] (28) failed to open "/data/data/avc.droid/files/avc.sqlite" with flag (131072) and modet (0) due to error (24) [SQLiteLog] (14) cannot open file at line 32546 of [9491ba7d73] [SQLiteLog] (14) osunix.c:32546: (24) open(/data/data/avc.droid/files/avc.sqlite) - [Mono] DllImport attempting to load: '/system/lib64/liblog.so'. [Mono] DllImport loaded library '/system/lib64/liblog.so'. [Mono] DllImport searching in: '/system/lib64/liblog.so' ('/system/lib64/liblog.so'). [Mono] Searching for 'androidlogprint'. [Mono] Probing 'androidlogprint'. [Mono] Found as 'androidlogprint'. [MonoDroid] UNHANDLED EXCEPTION: [MonoDroid] avc.DAL.Models.SQLiteException: Could not open database file: /data/data/avc.droid/files/avc.sqlite (2062) [MonoDroid] at avc.DAL.Models.SQLiteConnection..ctor (string,avc.DAL.Models.SQLiteOpenFlags,bool) [MonoDroid] at avc.DAL.Models.SQLiteConnection..ctor (string,bool) [MonoDroid] at avc.DAL.Core.DBConnection.GetConnection () [MonoDroid] at avc.DAL.Core.RetailerDAO..ctor () [MonoDroid] at avc.BL.Core.SyncManager..ctor () [MonoDroid] at avc.BL.Core.VersionManager..ctor () [MonoDroid] at avc.CommonCustomRequest.getUserVersion (Android.Content.Context,avc.Callback.Interface.IUserDataVersionCallback) [0x0009b] in d:\Workspace\Code Base\Android\avc-droid\avc-droid\Common\Config\CommonCustomRequest.cs:247 [MonoDroid] at avc.CommonCustomRequest.sendRequestForCheckVersion (Android.Content.Context,avc.Callback.Interface.IVersionCallback,avc.Callback.Interface.IUserDataVersionCallback,string,bool,bool) [0x0011a] in d:\Workspace\Code Base\Android\avc-droid\avc-droid\Common\Config\CommonCustomRequest.cs:230 [MonoDroid] at avc.SliderDrawerActivity.OnResume () [0x00079] in d:\Workspace\Code Base\Android\avc-droid\avc-droid\View\SliderDrawer\Activity\SliderDrawerActivity.cs:298 [MonoDroid] at Android.App.Activity.nOnResume (intptr,intptr) [0x00009] in /Users/builder/data/lanes/1879/5f55a9ef/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.App.Activity.cs:4374 [MonoDroid] at (wrapper dynamic-method) object.7d205bac-0b41-4672-b7e1-8b33b6502c34 (intptr,intptr) [art] JNI RegisterNativeMethods: attempt to register 0 native methods for md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable [AndroidRuntime] Shutting down VM [NativeCrypto] AppData::create pipe(2) failed: Too many open files [NativeCrypto] AppData::create pipe(2) failed: Too many open files

    Please suggest any work around to get rid of this issue.

    Thanks in advance.

    Wednesday, August 12, 2015 5:36 AM

Answers

  • User1341 posted

    Do you open a new SqliteConnection every time the app has to query data? If so I would suggest to refactor it to open only one connection and use this for every database operation. A friend of mine wrote a good blog post with general advices for sqlite.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, August 12, 2015 11:21 AM
  • User1341 posted

    I am going with Mono.Data.Sqlite.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, August 12, 2015 5:15 PM

All replies

  • User1341 posted

    Do you open a new SqliteConnection every time the app has to query data? If so I would suggest to refactor it to open only one connection and use this for every database operation. A friend of mine wrote a good blog post with general advices for sqlite.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, August 12, 2015 11:21 AM
  • User143588 posted

    Thanks for your quick response :-)

    Have one more query, we have common core code base that will be support for IOS, Android. We have used SQLite.cs for local storage in common code base. Our current implementation was establishing the connection every operation. However i am going to change the logic in core level as per suggestion, but the challenge here our SQLiteConnection class is not allowing to use 'State' and 'ConnectionState' Property. Is there any sqlite class for support both platforms?

    Thanks once again.

    Wednesday, August 12, 2015 4:45 PM
  • User1341 posted

    I am going with Mono.Data.Sqlite.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, August 12, 2015 5:15 PM
  • User143588 posted

    I am fine with that, But why we have used SQLite.Net it will support for both the application (Android, IOS) which will be provided by xamarin component itself and we couldn't able to find out any Mono.Sqlite.cs from xamarin. Please provide your input regarding this.

    Is there any way to use those properties 'State' and 'ConnectionState' in SQLite.Net by adding any reference over there?

    Thanks advance,

    Thursday, August 13, 2015 2:37 PM