PROPFIND every minute



  • Hello,
    It is not a bug report, just a question. I see that davdroid performs a PROPFIND request every minute (sometimes every half of minute), and it looks bad for battery life. I have set syncronization interval to 1 day. Is that behavior intended? Thanks.


  • developer

    @axio No, it's not, and it doesn't behave like that in our tests and on our own devices. Please provide more details, especially logs.


  • developer

    Maybe you use an old version of DAVdroid with Android 7.x?



  • Okay. I'm using radicale server behind nginx. Android 4.2.1. Davdroid version 1.6.4-ose.

    1. nginx config:
    location /dav/ {
    	auth_basic	        "Restricted";
    	auth_basic_user_file	/home/nginx/passwds/dav;
    	proxy_set_header  	X-Script-Name /dav;
    	proxy_set_header  	X-Forwarded-For $proxy_add_x_forwarded_for;
    	proxy_set_header     	X-Remote-User $remote_user;
    	proxy_pass        	http://127.0.0.1:5232/;
    }
    
    1. radicale config:
    [server]
    hosts = 127.0.0.1:5232
    daemon = True
    pid = ~/pid
    
    [auth]
    type = http_x_remote_user
    
    [storage]
    filesystem_folder = ~/collections
    
    [rights]
    type = owner_only
    
    1. davdroid log file (I've turned logging on, sync'ed, then blocked my phone and waited for 10 minutes): link
    2. nginx log is full of
    <ip> - <username> [07/Aug/2017:07:56:32 -0400] "PROPFIND /dav/<path-to-calendar>/ HTTP/1.1" 207 254 "-" "DAVdroid/1.6.4-ose (2017/07/29; dav4android; okhttp3) Android/4.2.1"
    

  • developer

    2017-08-07 14:51:55 78 [syncadapter.SyncAdapterService] at.bitfire.davdroid.addressbooks sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 14:51:55 79 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 14:51:55 80 [syncadapter.SyncAdapterService] com.android.contacts sync of Account {name=main-addressbook (username XA), type=at.bitfire.davdroid.address_book} has been initiated
    2017-08-07 14:51:59 81 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 14:52:49 82 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 14:53:19 83 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 14:53:51 84 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 14:54:22 85 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 14:55:22 86 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 14:55:53 87 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 14:56:23 88 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 14:56:54 89 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 14:57:24 90 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 14:57:55 91 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 14:58:26 92 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 14:58:56 93 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 14:59:56 94 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 15:00:57 95 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 15:01:27 96 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 15:02:27 97 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated
    2017-08-07 15:03:27 98 [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=username, type=bitfire.at.davdroid} has been initiated

    Something (probably some third-party app) continuously requests/initiates calendar synchronizations. Please note that this is not handled by DAVdroid, but by Android (which in turn calls DAVdroid to actually do the requested sync). So, this is not a DAVdroid problem. Are there any suspicious third-party apps installed?



  • Hmm, I guess no. Is there in android some kind of call stack of service calls?
    Just in case, I have installed:
    AutoCallRecorder (records calls :))
    ClockSync
    Conversations (xmpp client)
    CSipSimple (sip client)
    Deezer
    Email (standard android e-mail client)
    F-Droid
    FBReader
    feedly (google reader client)
    Firefox
    Google app
    Greenify (app freezer)
    MAPS.ME (openstreetmap client)
    Twitch messenger
    MX Player Pro (video player)
    Nova Launcher
    OpenVPN
    Orbot
    Play Market
    Pushbullet (messenger)
    RD Client (Microsoft's RDP client)
    Shazam (songs recongnition)
    SleepTimer
    Sports Tracker
    Steam
    Syncthing
    Titanium Backup
    Total Commander
    Twitch
    VNC Viewer
    Youtube
    ... and a bunch of standard apps like phone, clock, contacts, etc. Most of 3rd party apps are normally frozen, except sip client, xmpp client, clock sync and pushbullet.


  • developer

    @axio said in PROPFIND every minute:

    Hmm, I guess no. Is there in android some kind of call stack of service calls?

    You can have a look into the adb logs: enable USB debugging on your phone, install adb on your PC (most distributions have a package called android-tools or something like that) and see what's going on. They might contain more information about what's calling the synchronization.



  • Okay, thank you for info. After small digging in logcat I've found this line:

    I/CalendarProvider2(16593): Sending notification intent: Intent { act=android.intent.action.PROVIDER_CHANGED dat=content://com.android.calendar }
    

    It repeats every minute and invokes android.content.syncmanager.SYNC_ALARM. I don't know why CalendarProvider2 sends this notifications, so I suppose that turning calendar sync off is the best solution. Or maybe I'll try to remove apps one by one...
    Thank you again for your time.


Log in to reply
 

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