question

VivekKumar-6531 avatar image
0 Votes"
VivekKumar-6531 asked RafaelSanchezdelaPaz-6069 answered

Azure web job out of memory exception

Hi,

I created a web job to generate a excel with OpenXml SAX approach.
While creating the excel I am facing an "out of memory exception in writer.WriteStartElement(new Cell(), attributes)" on 130,000th row with 32 columns each. As per the logs I didn't used more than 40% of the available memory but still I am facing this issue.

Plan : Isolated 2 with 7gb RAM
App service : .net version : core 3.1, Platform : 64 bit.
App Service : memory working set (Max) = 1.1 GB
App service plan memory consumption percentage : always less than 40%

69987-capture.jpg


azure-webapps-performanceazure-webapps-monitoring
capture.jpg (47.7 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for asking question! You may capture the memory dump in your azure app service and analyze the dump to narrow down issue.
Refer to this tutorial for getting a full memory dump. Remote debugging with visual studio would be helpful here.

Check this SO thread might helps.

If issues remains request you to please send an email to AzCommunity[at]Microsoft[dot]com referencing this issue, we would like to work closer with you on this matter.


0 Votes 0 ·

Just checking in to see if you have chance to see below response.

0 Votes 0 ·

1 Answer

RafaelSanchezdelaPaz-6069 avatar image
0 Votes"
RafaelSanchezdelaPaz-6069 answered

Issue can be related with a known issue in Open-XML SDK with SAX and Net Core:

https://github.com/OfficeDev/Open-XML-SDK/issues/807

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.