I deployed a spring boot application in google appengine flexible environment with below configuration
env: flex
runtime: java
service: default
health_check:
enable_health_check: False
manual_scaling:
instances: 1
Everything was running fine and and alto call all rest end point till today morning. Now its giving 502 Bad Gateway
for any call.
When I dig more found out in the log that its a memory issue. the log shows below error. command to read log gcloud app logs read
.
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 12288 bytes for committing reserved memory.
# An error report file with more information is saved as:
# //hs_err_pid1.log
# [ timer expired, abort... ]
[thread 140186444871424 also had an error]
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f7fb03d7000, 12288, 0) failed; error='Cannot allocate memory' (errno=12)
Anyone resolved this issue.