1

I have a very simple Java 11 Spring Boot application running on Google's App Engine. The problem is that the instance running the app keeps restarting very very often. Sometimes as often as 70 times per day.

When I observe the instance in App Engine's instance overview I see exactly that. The instance count jumps to zero just to start up a new instance a few minutes later. The memory usage always seems to stay well within the 256MB limit.

Instance count over 6h: https://i.stack.imgur.com/ngkRf.png

Memory usage over 6h: https://i.stack.imgur.com/RyxIU.png

Looking at all the logs available in Google's Log Viewer, all I see is the following message with no additional information:

2020-04-08 10:21:52.626 EDT [start] 2020/04/08 14:21:52.626133 Quitting on terminated signal

Followed by the obvious prints from the Spring framework about shutting down the servelet.

After a bit when the next HTTP request arrives, the request is logged but gets the following warning attached:

2020-04-08 10:25:24.974 EDT This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.

Immediately followed by:

2020-04-08 10:25:08.018 EDT [start] 2020/04/08 14:25:08.002384 Starting app 2020-04-08 10:25:08.021 EDT [start] 2020/04/08 14:25:08.016623 Executing: /bin/sh -c exec serve streamtracker-0.0.1-SNAPSHOT.jar

Then the Spring Boot app does its normal startup and the usual Spring logs appear.

During all of that, there is not a single mention of any problem or error from the App Engine instance in the Log Viewer. So I cannot understand why the instance is being restarted all the time. It cannot be due to being idle, I see from the logs that the last HTTP request got successfully served just two minutes before the forced shutdown.

Is there any way how I can find out why Google keeps restarting my application?

0 Answers0