Azure Web App REST request timeout

Matt Bair 30 Reputation points
2024-06-10T20:15:58.8066667+00:00

I have an Azure Web App

C#, .NET 8.0; uses a React (18.2) front end

The app makes regular calls to Azure SQL, Azure CosmosDB and Azure BLOB storage.

All works very well except when I try to retrieve images from Azure BLOB storage. The REST call times out after about 8-12 seconds. The call to Azure succeeds, but the application front end has already received a 504 error (Gateway Timeout).

The TypeScript code:

return await CrudFunctions.getData(`experiment/cellimagefromblobstorage/${props.experiment.experimentId}/${props.plateName}/${imageName}`) 
     .then((data) => {
         if (data && data.base64) {
             setSelectedImageBlob(data.base64);
         }
     })
     .catch((err) => {
         console.error(err);
     });

The Controller function:

[HttpGet]
[Route("cellimagefromblobstorage/{experimentId}/{plateName}/{imageName}")]
public ActionResult<img> DownloadCellImageFromBlobStorage(string experimentId, string plateName, string imageName)
{
    ...

    var downloadCellImageResult =
        UberDataProvider.ExperimentDataProviderInstance.DownloadCellImageFromBlobStorage(experimentId, plateName, imageName);
    
    ...

    return downloadCellImageResult.Value;
}

The code to call BLOB storage:

public Result
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,416 questions
{count} vote