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: 

Re: client.files().downloadBuilder drops download speed suddenly

client.files().downloadBuilder drops download speed suddenly

programmer
Helpful | Level 5

I use this simplified java code to download some binary files:

 

DbxClientV2 client;//some client
String filePath;//some file path

OutputStream out;//some output stream


try (DbxDownloader<FileMetadata> dbxDownloader = client.files().downloadBuilder(filePath).start()) {
    dbxDownloader.download(out);
}



This code works fine generally and I get download speed from 7 to 23 mbps which is fine. The problem is that sometimes download speed drops to 1-2  mbps which is really bad. Here is an application log:


2024-04-04 12:04:33.574 24309-24501                     D  loading file: speed: 18, file: id:10UWZKWhJqcAAAAAAAJBqQ, size: 2371380
2024-04-04 12:04:38.965 24309-24522                     D  loading file: speed: 23, file: id:10UWZKWhJqcAAAAAAAJBqg, size: 2928566
2024-04-04 12:04:44.306 24309-24524                     D  loading file: speed: 23, file: id:10UWZKWhJqcAAAAAAAJBqw, size: 2956275
2024-04-04 12:04:47.684 24309-24527                     D  loading file: speed: 19, file: id:10UWZKWhJqcAAAAAAAJBrA, size: 2407644
2024-04-04 12:04:52.196 24309-24553                     D  loading file: speed: 23, file: id:10UWZKWhJqcAAAAAAAJBrQ, size: 2952367
2024-04-04 12:04:57.285 24309-24564                     D  loading file: speed: 23, file: id:10UWZKWhJqcAAAAAAAJBrg, size: 2940233
2024-04-04 12:05:03.335 24309-24569                     D  loading file: speed: 19, file: id:10UWZKWhJqcAAAAAAAJBrw, size: 2378543
2024-04-04 12:05:04.833 24309-24472                     D  loading file: speed: 19, file: id:10UWZKWhJqcAAAAAAAJBsA, size: 2424970
2024-04-04 12:05:15.569 24309-24582                     D  loading file: speed: 23, file: id:10UWZKWhJqcAAAAAAAJBsg, size: 2987888
2024-04-04 12:05:24.744 24309-24591                     D  loading file: speed: 19, file: id:10UWZKWhJqcAAAAAAAJBtA, size: 2391865
2024-04-04 12:05:29.365 24309-24592                     D  loading file: speed: 23, file: id:10UWZKWhJqcAAAAAAAJBtg, size: 2919918
2024-04-04 12:05:29.664 24309-24573                     D  loading file: speed: 1, file: id:10UWZKWhJqcAAAAAAAJBsQ, size: 2932285
2024-04-04 12:05:33.909 24309-24472                     D  loading file: speed: 19, file: id:10UWZKWhJqcAAAAAAAJBtw, size: 2439522
2024-04-04 12:05:43.774 24309-24600                     D  loading file: speed: 23, file: id:10UWZKWhJqcAAAAAAAJBuQ, size: 2939836
2024-04-04 12:05:48.715 24309-24601                     D  loading file: speed: 23, file: id:10UWZKWhJqcAAAAAAAJBug, size: 2983021
2024-04-04 12:05:52.969 24309-24598                     D  loading file: speed: 1, file: id:10UWZKWhJqcAAAAAAAJBuA, size: 2959283
2024-04-04 12:05:53.920 24309-24703                     D  loading file: speed: 23, file: id:10UWZKWhJqcAAAAAAAJBuw, size: 2967235
2024-04-04 12:06:00.351 24309-24472                     D  loading file: speed: 7, file: id:10UWZKWhJqcAAAAAAAJBvA, size: 2914084
2024-04-04 12:06:02.282 24309-24720                     D  loading file: speed: 19, file: id:10UWZKWhJqcAAAAAAAJBvQ, size: 2392119
2024-04-04 12:06:08.013 24309-24726                     D  loading file: speed: 23, file: id:10UWZKWhJqcAAAAAAAJBvg, size: 2966248
2024-04-04 12:06:11.106 24309-24472                     D  loading file: speed: 19, file: id:10UWZKWhJqcAAAAAAAJBvw, size: 2414962
2024-04-04 12:06:16.789 24309-24734                     D  loading file: speed: 23, file: id:10UWZKWhJqcAAAAAAAJBwA, size: 2951212
2024-04-04 12:06:21.424 24309-24745                     D  loading file: speed: 19, file: id:10UWZKWhJqcAAAAAAAJBwQ, size: 2388051
2024-04-04 12:06:31.055 24309-24748                     D  loading file: speed: 23, file: id:10UWZKWhJqcAAAAAAAJBxA, size: 2926640
2024-04-04 12:06:33.903 24309-24749                     D  loading file: speed: 19, file: id:10UWZKWhJqcAAAAAAAJBxQ, size: 2421943
2024-04-04 12:06:40.335 24309-24751                     D  loading file: speed: 23, file: id:10UWZKWhJqcAAAAAAAJBxg, size: 2928264



See the following records:

2024-04-04 12:05:29.664 24309-24573                     D  loading file: speed: 1, file: id:10UWZKWhJqcAAAAAAAJBsQ, size: 2932285

2024-04-04 12:05:52.969 24309-24598                     D  loading file: speed: 1, file: id:10UWZKWhJqcAAAAAAAJBuA, size: 2959283
 
 
Why is that?
 
 
And yes: I DON'T have problems with the internet -- speed dropping occurs on different network environments -- lan, wifi, mobile internet.
7 Replies 7

Greg-DB
Dropbox Staff

Your connection speed to Dropbox depends on the routing you get between your ISP and our servers, and may be slower than your ISP's rated speeds.

 

Sometimes resetting or retrying your connection gets you a different route and better speeds, but that is outside of our control. Some ISPs also throttle sustained connections so if you see an initial high connection speed followed by lower speeds, that could be the reason.

programmer
Helpful | Level 5

Unfortunately the issue is not about my ISP. The same application code works fine for hours if using google drive.

 

 

I could try to check if it is a plan related issue, but I can't -- my country is not in the list on payment form. Could you give me a "Plus" plan for a couple of days? I will tell which account for.

Greg-DB
Dropbox Staff

The network route/performance between you and the Dropbox servers may be different than that between you and the Google servers, so that may not be a useful comparison.

 

I can't give you a free temporary upgrade, but the connection speed is not dependent on your plan type anyway.

programmer
Helpful | Level 5

I understand that all can be explained the way that the things depend on depend on depend on ... The reality is it works for google drive and works poorly for dropbox. So that I can not suggest the users of my application to choose dropbox and only allow them to use google.

I would suggest you check on your site the logs or whatever given the file ids from the log I gave you. If you need fresh logs I can provide it.

Greg-DB
Dropbox Staff

Thanks for the feedback! Unfortunately I can neither look up nor modify your connection speed based on the file IDs (or other identifiers) though.

programmer
Helpful | Level 5

And how does it happen that it is reproducable using 2 different ISP on my side?

Greg-DB
Dropbox Staff

I can't offer insight on what your ISP(s) may or may not be doing, but if you have any questions regarding that you may want to reach out to them.

 

In any case, there would be other factors out of our control impacting the actual connection speed you see in practice anyway. I also notice that in the log you shared the timestamps seem to be very close to each other, so it seems like you may be running these in parallel; there may be some natural congestion/variabaility based on how you're queuing/pooling these.

 

If you believe there's an issue with the Dropbox API or SDK itself though, feel free to share the reset of the necessary code and steps to reproduce the issue and we'll be happy to take a look.

Need more support?