azure-functions-host: 64bit v3 runtime fails with out memory exceptions where 32bit runtime does not
We have had a ~2 .netcorev2.2 functions app running for some time. It was running on 64 bit runtime. After upgrading to ~3 functions frequently fail with out of memory exceptions when using the 64bit runtime. The 32bit runtime does not fail.
The exceptions seem to always occur in json deserialization.
Investigative information
- Timestamp: 12/31/2019, 9:50:18 AM (Local time)
- Function App version: 3.0
- Function App name:
- Function name(s):
- Region: UK South
- Invocation ID:
INFORMATION9:50:07.056 AM
Executing 'api-Payments' (Reason='This function was programmatically called via the host APIs.', Id=7e6c2c73-89ac-4881-b4f3-b6de55f23eb7)
- Applications Insight logging:
// All telemetry for Operation ID: 7cc2acc54214dc439fd9ac8d0c774da2
union *
| where timestamp > datetime("2019-12-30T17:50:18.720Z") and timestamp < datetime("2020-01-01T17:50:18.720Z")
| where operation_Id == "7cc2acc54214dc439fd9ac8d0c774da2"
Repro steps
Switch to 64bit runtime and exercise the API.
Expected behaviour
No exceptions
Actual behavior
Out of memory exceptions raised
Known workarounds
Use 32bit runtime
Related information
- FSharp language
- Source available privately
- HttpTrigger
- Suspect the issue is with the customized json.net deserialization.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 6
- Comments: 25 (7 by maintainers)
We have found an infrastructure issue that is causing OutOfMemoryException, it is affecting functions. We have a repro of the issue and are actively working to find the root cause.
A fix for this is currently rolling out. We’ll update and close the issue once deployment is completed.
For me, my scenario is a lot simpler and always threw OutOfMemoryException. I have a single TimerTrigger function which downloads a ~55Mb file, compresses it and writes to a blob. This has run successfully for over a year - I upgraded it to Azure Functions ~3 and selected 64-bit. When it fails, it is it is usually at about the 20Mb range on the line
await response.Content.ReadAsStreamAsync()
.Complete code, no databases or anything complex processing, just a single download from HTTP. Problem goes completely when 32-bit.
Simplified version that just read into a memory stream also showed the same problem. Input file has was never more than 60Mb. When 64-bit, always OutOfMemoryException, when 32-bit, works every time.
Rollout for the fix is complete now. Closing the issue.
I have the same issue as well:
@fabiocav please let me know if you still need some extra info for the investigation.