Max Memory Used Incorrect
See original GitHub issueDescription:
When using the python 3.8 lambda runtime the ‘Max Memory Used’ always shows the same number as the total memory allocated.
Steps to reproduce:
Running any python 3.8 lambda w/ v 1.13.2
Observed result:
Max Memory Used always = Memory Allocated
Expected result:
Expected result is the actual memory usage of the Lambda
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: Linux Centos 7
sam --version
: 1.13.2
Other versions: awscli: 1.18.189 botocore: 1.19.14 boto3: 1.13.19
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:9 (2 by maintainers)
Top Results From Across the Web
The usable memory may be less than the installed ...
Describes a problem in which Windows 7 reports that the usable memory is less than the installed memory.
Read more >Memory Dangerously Low or Max Memory Too High
1) Decide what to set your max server memory (MB) to. Our simple “starter” rule of thumb is to leave 4GB or 10%...
Read more >AWS Lambda function increasing Max Memory Used
It keeps increasing after some executions, it goes from 217MB to 218MB, after to 219MB and so on. This function is running multiple...
Read more >Unable to Start SQL Server Service or Connect After ...
Verify that the server has adequate memory. Use sp_configure with option 'user connections' to check the maximum number of user connections ...
Read more >Incorrect Memory Used values with a '#' sign or as '#1' for ...
sp_configure shows incorrect 'Memory Used' values with a '#' sign or as '#1' for ... For example: 1> sp_configure 'max memory', 0, '2048G'...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jfuss For the original issue, would it be possible to omit that false “Max Memory Used” entirely if it’s not possible to make it accurate? At least then it wouldn’t be misleading
For my comment, ah ok, I was unaware that AWS Lambda itself didn’t provide an OOM error. Thanks for the tip about the various behaviours 👍 Some sort of improvement would certainly be appreciated and I’ll inform you if something does come to mind
And unfortunately losing all the features in subsequent releases 😅 I’m really enjoying the official Warm Containers feature from 1.14!
I was bit by this quite badly recently, not strictly because the Memory Usage is the same as the Memory Size, but because there is no error telling me there is an Out Of Memory error when it actually happened. The Lambda just fails once the memory limit is hit, with the following output:
Note: I’m not even getting the opportunity to respond, the process just quits as soon as the memory limit is reached. So that ‘invalid JSON response’ message had me chasing the wrong goose.
Given the limitation to display the memory usage, would it be possible to notify me that an OOM error has occurred such that I can debug accordingly?
Thanks!