title: Azure Function: Blob Trigger throws System.OutOfMemoryException
body: <p>I am getting System.OutOfMemoryException exception for Blob Trigger Azure Function.
  When I am executing locally it is working fine.</p>
  <p><a href="https://i.stack.imgur.com/PJs9o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PJs9o.png" alt="enter image description here" /></a></p>
  <p>Blog Trigger Azure Function:</p>
  <pre><code>public static class ProcessEvent
      {
          [FunctionName(nameof(ProcessEvent))]
          public static async Task Run([BlobTrigger(BlobStorageContainer.Name + &quot;/{name}&quot;,
              Connection = &quot;AzureWebJobsStorage&quot;)]
              Stream eventBlob, string name,
              [Inject] ILoggingService loggingService,
              [Inject] IEventProcessorService eventProcessor,
              [Inject] IBlobClient blobClient)
          {
              var logger = new Logger(loggingService);
              try
              {
                  logger.Info($&quot;Starting blob job tracker for file name {name}&quot;,
                      nameof(ProcessEvent));
  
                  var eventContent = eventBlob.ReadAsString();
  
                  var result = await eventProcessor.HandleProcessor(eventContent, logger);
  
                  if (result)
                  {
                      await blobClient.DeleteBlobAsync(BlobStorageContainer.Name, name);
                      logger.Info($&quot;Blob deleted successfully file name: {name}&quot;);
                  }
                  else
                  {
                      logger.Warning($&quot;Unable to process blob job for file with name: {name}&quot;);
                  }
              }
              catch (Exception ex)
              {
                  logger.Error($&quot;Unable to process blob job for file with name: {name}&quot;, ex,
                      nameof(ProcessEvent));
              }
          }
      }
  </code></pre>
  <p>My App Service Plan:</p>
  <p><a href="https://i.stack.imgur.com/GapcD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GapcD.png" alt="enter image description here" /></a></p>