-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uploading a stream to a block blob extremely slow #29
Comments
Hi @connor4312 I think main reason for the slow uploading is because For high performance uploading, please use BTW, how do you know "This indicates that BlockBlobUrl.upload does not consume the file stream? |
I can tell this because the Parser stops emitting entry events. In the quoted section of the docs, they say that's how they work. Using
Should this be the way it works? As a naive consumer I would expect |
Hi @connor4312 Is the timeout error thrown by const pipeline = StorageURL.newPipeline(sharedKeyCredential, {
logger: {
log: console.log,
minimumLogLevel: HttpPipelineLogLevel.INFO
}
}); At least, you should not use parser.on('entry', file => {
blobUrl.upload(Aborter.none, () => file, file.size, {
blobHTTPHeaders: {
blobContentType: mime.getType(file.path)!,
},
});
}); We will make the documentation about |
Which service(blob, file, queue, table) does this issue concern?
Blob
Which version of the SDK was used?
"@azure/storage-blob": "^10.2.0-preview"
What's the Node.js/Browser version?
Node.js
What problem was encountered?
Storage streams never drained / flushed.
Steps to reproduce the issue?
For one scenario we're using the
tar
package and uploading streams directly from tar archives, using theentry
event.A few files upload fine, but then it gets 'stuck' and takes several minutes before, slowly, continuing on to upload more files. This indicates that
BlockBlobUrl.upload
does not consume the file stream. The promise returned fromblobUrl.upload
also does not resolve.Our code is something like this:
There's a bit more stuff in there around handling promises and such, but that's the gist of it.
Using
storage.createBlockBlobFromStreamAsync
from the previous SDK worked fine in this scenario, and also manually callinguploadStreamToBlockBlob
works......but the more ergonomic blobUrl.upload does not.
Have you found a mitigation/solution?
Above ^
The text was updated successfully, but these errors were encountered: