Not possible to sync more than 500 contacts



  • Errorlog:

    D/davdroid.LocalCollection( 1979): Committing 1500 operations
    E/DatabaseUtils( 6323): Writing exception to parcel
    E/DatabaseUtils( 6323): android.content.OperationApplicationException: Too many content provider operations between yield points. The maximum number of operations per yield point is 500
    E/DatabaseUtils( 6323): at com.android.providers.contacts.AbstractContactsProvider.applyBatch(AbstractContactsProvider.java:216)
    E/DatabaseUtils( 6323): at com.android.providers.contacts.ContactsProvider2.applyBatch(ContactsProvider2.java:2225)
    E/DatabaseUtils( 6323): at android.content.ContentProvider$Transport.applyBatch(ContentProvider.java:260)
    E/DatabaseUtils( 6323): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:192)
    E/DatabaseUtils( 6323): at android.os.Binder.execTransact(Binder.java:404)
    E/DatabaseUtils( 6323): at dalvik.system.NativeStart.run(Native Method)
    E/davdroid.DavSyncAdapter( 1979): Local storage (content provider) exception
    E/davdroid.DavSyncAdapter( 1979): at.bitfire.davdroid.resource.LocalStorageException: Couldn't access local content provider
    E/davdroid.DavSyncAdapter( 1979): at at.bitfire.davdroid.resource.LocalCollection.commit(LocalCollection.java:316)
    E/davdroid.DavSyncAdapter( 1979): at at.bitfire.davdroid.syncadapter.SyncManager.pushDirty(SyncManager.java:180)
    E/davdroid.DavSyncAdapter( 1979): at at.bitfire.davdroid.syncadapter.SyncManager.synchronize(SyncManager.java:47)
    E/davdroid.DavSyncAdapter( 1979): at at.bitfire.davdroid.syncadapter.DavSyncAdapter.onPerformSync(DavSyncAdapter.java:129)
    E/davdroid.DavSyncAdapter( 1979): at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:259)
    E/davdroid.DavSyncAdapter( 1979): Caused by: android.content.OperationApplicationException: Too many content provider operations between yield points. The maximum number of operations per yield point is 500
    E/davdroid.DavSyncAdapter( 1979): at android.database.DatabaseUtils.readExceptionWithOperationApplicationExceptionFromParcel(DatabaseUtils.java:158)
    E/davdroid.DavSyncAdapter( 1979): at android.content.ContentProviderProxy.applyBatch(ContentProviderNative.java:519)
    E/davdroid.DavSyncAdapter( 1979): at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:377)
    E/davdroid.DavSyncAdapter( 1979): at at.bitfire.davdroid.resource.LocalCollection.commit(LocalCollection.java:311)
    E/davdroid.DavSyncAdapter( 1979): ... 4 more
    I/davdroid.DavSyncAdapter( 1979): Sync complete for com.android.contacts
    D/davdroid.DavSyncAdapter( 1979): Closing httpClient



  • It is worth noting that DAVdroid appears to handle more than 500 contacts. I have 685 contacts and it works properly AFAIK.

    I personally have not looked at exactly how it does so. The above error suggests it does 500 and then on the next sync does 500 more. But I have no idea.



  • the problem is bulkimport. F.e. when you import your old addressbook to the new davdroidaccount.


  • developer

    the problem is bulkimport. F.e. when you import your old addressbook to the new davdroidaccount.

    Did you clean up the VCards? I recommend to export your old address book, then either get them onto your server and clean them up there or cleanup them up before uploading. Generally, I consider uploading the addresses to the server and then syncing to the mobile device safer than importing to the mobile phone and uploading via DAVdroid.



  • Android does not handle VCF imports well. The code there is buggy as hell.


  • developer

    Because yield points are correctly set for add and update operations, I'll close this as WONTFIX.

    Unfortunately, Android is very limited concerning transaction size. Maybe it helps to keep in mind that it's still a mobile device and not a full desktop PC so resources are not endless.

    I hope that they will increase the maximum transaction size some day, so these problems will go away automatically.


  • developer


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.