apache / apache/openwhisk-runtime-java

JVM heap size is not set correctly for Java actions

Đang mở
#5 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Java
Star
47
Fork
58
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

@rabbah commented on [Thu Jun 15 2017](https://github.com/apache/incubator-openwhisk/issues/2389)

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.

```bash
> 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.

---

@jsanda commented on [Mon Oct 23 2017](https://github.com/apache/incubator-openwhisk/issues/2389#issuecomment-338742448)

Is something like [this](https://github.com/fabric8io-images/java/tree/master/images/jboss/openjdk8/jdk) 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.