cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App 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: 

Uploading big file using Objective-C API V2 very SLOW...

Uploading big file using Objective-C API V2 very SLOW...

C. Logan
Explorer | Level 3

Hello,

 

recently our app updates the Dropbox related code from API V1 to API V2. Usually we need to transfer files to Dropbox, it is OK for small files, but for video files of size about 1.5 GB the progress is very slow, and often the upload is stopped due to request timeout.... 

 

We use the following API calls:

1. Start the upload

[client.filesRoutes uploadSessionStartData:data];

 

2. Repeatedly upload new chunk of data

[client.filesRoutes uploadSessionAppendV2Data:cursor inputData:chunk];

 

3. Finish upload for the last chunk

[client.filesRoutes uploadSessionFinishData:cursor commit:info inputData:chunk];

 

And the log messages are as follows:

 

2017-01-20 14:25:11.336692 MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0000

2017-01-20 14:25:11.343177MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0000

2017-01-20 14:25:11.349521MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0001

2017-01-20 14:25:11.353344MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0001

 

// Skip...

 

2017-01-20 14:25:55.059215MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0003

2017-01-20 14:25:55.070222MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0003

2017-01-20 14:26:17.700571MyApp[19184:6471639] start: bytesWritten = 65536 progress = 0.0003

2017-01-20 14:26:17.704239MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0003

2017-01-20 14:26:34.987083MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0004

2017-01-20 14:26:34.992280MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0004

2017-01-20 14:26:35.005880MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0004

 

// No data downloaded for about 23 sec

 

2017-01-20 14:26:58.848907MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0004

2017-01-20 14:26:58.855699MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0004

2017-01-20 14:26:58.871372MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0005

2017-01-20 14:26:58.873328MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0005

2017-01-20 14:27:15.431969MyApp[19184:6471639] start: bytesWritten = 65536 progress = 0.0005

2017-01-20 14:27:15.436307MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0006

2017-01-20 14:27:44.313052MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0006

2017-01-20 14:27:44.318937MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0006

2017-01-20 14:27:44.323024MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0006

2017-01-20 14:27:44.327415MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0006

2017-01-20 14:28:10.012220MyApp[19184:6471639] start: bytesWritten = 65536 progress = 0.0007

2017-01-20 14:28:10.015194 MyApp[19184:6471639] start: bytesWritten = 32768 progress = 0.0007

 

// Skip...

 

2017-01-20 14:59:18.994143 MyApp[19184:6471639] __70-[....]_block_invoke [Line 92] start: requestError = DropboxClientError[{

    NSError = "Error Domain=NSURLErrorDomain Code=-1001 \"\U8981\U6c42\U903e\U6642\U3002\" UserInfo={NSUnderlyingError=0x17025bb70 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 \"(null)\" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=https://api-content.dropbox.com/2/files/upload_session/start, NSErrorFailingURLKey=https://api-content.dropbox.com/2/files/upload_session/start, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=\U8981\U6c42\U903e\U6642\U3002}";

}];

 

2017-01-20 14:59:18.994833 MyApp[19184:6471639] __74-[...]_block_invoke_2 [Line 428] Failed To Upload /Horrible.Bosses.2011.DVDRip.XVID.AC3.HQ.Hive-CM8.avi

Error = DBRequestErrorClient

2017-01-20 14:59:18.995478 MyApp[19184:6475977] [] __tcp_connection_write_eof_block_invoke Write close callback received error: [89] Operation canceled

 

It can be seen from the log messages that the time the data arrived is not very smooth, and finally the operation is canceld.

 

My questions:

Is it pure network traffic problem?(Our network is relatively fast.)

Or is there something in API V2's upload API that causes the upload so slow?

 

Thanks for your attention.

 

Best regards,

Logan

 

22 Replies 22

Greg-DB
Dropbox Staff
I was able to reproduce the slow uploads, due to what appears to be a performance regression on our side. I wasn't able to reproduce exactly the same error you're getting in some cases, but I believe these are both related to the issue we found. We're looking into it.

Pooja_S
New member | Level 2

Hi Greg,

 

I am also facing the same issue using API V2. File uplaod seems to be very slow. I have tried with 1.5 Gb file with chunk size 4MB. It is going on more than 6 hrs.

 

Good to hear your team is already looking into it. Looking forward for the solution.

 

Thanks,

Pooja

mikewu1211
New member | Level 2

Hi,

 

Any update?

Greg-DB
Dropbox Staff
The team has improved this somewhat, but is still working on bringing this back down more.

Bmcdonald1
New member | Level 2
We are having the same slowness issues on upload. On create folder API it is taking 10 seconds. In our product we transfer whole directory trees. Transferring 100 folders takes 100 * 10 seconds to create the folders. And we get rate limited on 90% of the requests.

Greg-DB
Dropbox Staff
Issues affecting create_folder would be different than the upload_session performance issues on this thread.

I'm not seeing the issue with create_folder you reported myself though. I see you also opened a ticket, so we'll look into it and follow up with you there specifically as it sounds like that may be account-specific.

Greg-DB
Dropbox Staff
The team has finished some further work on this, and is reporting the performance should be back to about previous levels. There is certainly still room left for improvement, and the team has an open feature request to improve performance in general, but I don't have a timeline for if/when further improvements would be implemented.

drowles
New member | Level 2

Hi - I'm trying to upload some files and it's taking FOREVER. I've been at this for a week. Right now - I have 3 files left that total 24 Gigs....and it SAYS that it will take 16 hours (or it says 24 hours, or 3 days, or more.) 

 

At a 3.7 MBPS rate - I should be able to upload 22 Megs per minute - or 2.2 Gigs per hour, I think - which means this should take me 12 hours...now it says 17 hours....am I wrong in this assumption? Thanks.

Greg-DB
Dropbox Staff

@drowles It sounds like you're referring to using the Dropbox desktop client. This thread was about using a particular programmatic interface, not the Dropbox desktop client. For help with the desktop client, please post in the "Desktop app issues" forum, or contact support.

drowles
New member | Level 2

WIll do - thanks much.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    DS6 Explorer | Level 4
  • User avatar
    drowles New member | Level 2
What do Dropbox user levels mean?