cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Increased latency after upgrade to .Net SDK 6.*

Increased latency after upgrade to .Net SDK 6.*

jfreer
Explorer | Level 4

I have an app that uses long-lived access tokens to upload files in the background.  In order to migrate to using refresh tokens, I upgraded from .Net SDK 4.9.* to .Net SDK 6.*.  The first call our app makes is to Files.GetMetadataAsync to determine if the file exists.  I noticed that if the call results in an AuthException (invalid_access_token), the latency of the call is now 10-20 seconds, whereas before the upgrade this was under 1 second.  I tried upgrading first to 6.0.1, and then to 6.2.  Same result.  There were 0 code changes with this upgrade; just an update of the Nuget package.  I have rolled back this upgrade until the problem is better understood.  I am using .Net core 3.1.  Any ideas why?

2 Replies 2

jfreer
Explorer | Level 4

I think I can answer my own question.  We create the DropboxClient without specifying MaxRetriesOnError.  In 6.*, this defaults to 4. If I set this to 0, then my code responds with latency values on par with the behavior in 4.9 SDK.  So, I suspect the 6.* SDK is retrying on AuthException, whereas the 4.9 SDK did not.  If it is retrying on AuthExceptions, this seems like a bug to me, especially if its an "invalid access token", as it is in my case.  The token isn't suddenly going to change and become valid on a retry.  

Greg-DB
Dropbox Staff

Thanks! It looks like your understanding is correct. I'm bringing this up with the team to see if we can update the SDK to not retry on an auth failure like that.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    jfreer Explorer | Level 4
What do Dropbox user levels mean?