Pivotal Knowledge Base

Follow

JAVA application is not terminating when getting Out of Memory Error

Environment

PCF Java Buildpack less than 3.1.5 

Symptom

Application logs report Out of memory but application does not immediately restart.

cf logs <app-name> reports error "killjava.sh: Permission denied."

Error Message:

ticket6.png

Cause 

The killjava.sh scripts used by the JREs in the 3.x line do not have the appropriate executable permissions after packaging. They should be in the list of files that are guaranteed to get executable permissions.

See: https://github.com/cloudfoundry/java-buildpack/issues/408

Resolution

The workaround is either to ensure that you do not end up with Out Of Memory or to upgrade to a newer version of the java buildpack. This issue is fixed in java buildpack 3.15 and higher versions.

Please download and install the latest version of java buildpack at: https://network.pivotal.io/products/buildpacks/

The following command can be ran to update java buildpack version:

cf update-buildpack java_buildpack -p <path to buildpack package> 

Comments

Powered by Zendesk