Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JVM heap size is not set correctly for Java actions #2389

Closed
rabbah opened this issue Jun 15, 2017 · 2 comments
Closed

JVM heap size is not set correctly for Java actions #2389

rabbah opened this issue Jun 15, 2017 · 2 comments

Comments

@rabbah
Copy link
Member

rabbah commented Jun 15, 2017

Java actions run with no heap settings, regardless of the container's memory limit: https://github.com/apache/incubator-openwhisk/blob/master/core/javaAction/Dockerfile#L38

This will cause a reused Java action to eventually be killed because the GC may not get a chance to run.

>  docker run -m 64M -it javaaction bash
# java -XX:+PrintFlagsFinal -version 2>&1 | grep MaxHeapSize
    uintx MaxHeapSize                              := 1035993088                          {product}

That's ~1GB even though memory limit for container is 64M.

lzbj pushed a commit to lzbj/openwhisk that referenced this issue Jul 5, 2017
lzbj pushed a commit to lzbj/openwhisk that referenced this issue Jul 5, 2017
@jsanda
Copy link
Contributor

jsanda commented Oct 23, 2017

Is something like this what you have in mind? run-java.sh is the default command for the image. Among other things it sets the JVM heap size based on container limits.

@rabbah
Copy link
Member Author

rabbah commented Nov 18, 2017

Issue moved to apache/incubator-openwhisk-runtime-java #5 via ZenHub

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

No branches or pull requests

2 participants