My function runs out of memory (OOM)
Problem
My function runs out of memory (OOM) and crashes or restarts.
Possible cause
In sandbox v1 and v2, some directories are mounted as tmpfs for temporary in-memory storage. In Sandbox v2, directories such as /tmp and /dev are stored in memory.
Excessive writes to /tmp can fill up the provisioned memory, leading to out-of-memory (OOM) errors, potentially triggering a function restart.
Solutions
- Avoid writing temporary files in
/tmp. - Use alternative storage paths within your function
- Increase the function's memory allocation to accommodate for temporary file usage
Refer to the dedicated documentation for more information on Sandboxes.
Still need help?Create a support ticket