Skip to content

curl exception against azurite: "Connection was closed by the server while trying to read a response" #4206

@ahojnnes

Description

@ahojnnes

When executing blob storage requests against azurite, our code occasionally hits the following exception that is bubbled up from the curl.cpp wrapper: "Connection was closed by the server while trying to read a response" - it seems that there could be three places, where this exception may be thrown. I have not managed to assemble a short code snippet to reproduce the issue, and we only observe this when running our emulated service against azurite.

What I see in practice when this issue happens:

  1. Many micro-services are talking in parallel to azurite.
  2. One of the services fails to communicate and freezes for roughly 30 seconds in a call to an azure-storage-blobs method. It eventually throws the exception above.
  3. I can consistently reproduce the issue on a call that looks as follows:
auto response = blobServiceClient->GetBlobContainerClient(container).GetBlobClient(name).Download();
response.Value.BodyStream->ReadToCount(
    reinterpret_cast<uint8_t*>(val.data()), val.size());

but it also happens for other calls.
4. The corresponding request never shows up in the azurite logs, which might indicate in a (temp) failure to talk to azurite, etc.
5. I have never seen the same issue when running the same code against real Azure blob storage.

Please let me know, if I can help with more details. Unfortunately, I cannot share the actual source code to replicate the issue.

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.StorageStorage Service (Queues, Blobs, Files)customer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions