Skip to content
This repository was archived by the owner on Jan 15, 2023. It is now read-only.
This repository was archived by the owner on Jan 15, 2023. It is now read-only.

Lambda Memory Size is Not Used When Running JVM #102

Closed

Description

@jaimm

The Max Heap Size for the JVM is currently hardcoded to be an arbitrary size of ~1.3GB. This means that if your function needs to use more than that, you can encounter OutOfMemoryErrrors in Docker, even though you don't when the function is running in Lambda

ENTRYPOINT ["/usr/bin/java", "-XX:MaxHeapSize=1336935k", "-XX:MaxMetaspaceSize=157286k", "-XX:ReservedCodeCacheSize=78643k", \

Would it be possible to instead use AWS_LAMBDA_FUNCTION_MEMORY_SIZE?

Activity

  1. mhart commented on Jun 30, 2018

    @mhart
    Member

    I used the value that was being used in production Lambda directly – it may have changed now that 3GB functions are allowed.

    What's the value you're seeing on Lambda itself?

  2. mhart commented on Jun 30, 2018

    @mhart
    Member

    Have fixed this in f5241cf – thanks for alerting me!

    Should be pushed up soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions