Askar
Askar

Reputation: 523

Container manager keep terminate container on signal 9

I am trying to play with Google Cloud Run, I have the same service that works fine in App Engine Flex. Any thoughts what could be the issue?

enter image description here

Somehow it shows that service is healthy.

enter image description here

Upvotes: 6

Views: 6655

Answers (4)

S. L.
S. L.

Reputation: 660

I kept searching for an answer and couldn't solve the issue. In my case, it turned out that the signal 9 was due to the process within my containers exceeding available resources, causing it to silently die.

The solution was to increase memory and cpu. Hope this helps someone else!

Upvotes: 0

AyoAyomide
AyoAyomide

Reputation: 121

For me, it was because billing was disabled Make sure billing is enabled on your GCP project

https://console.cloud.google.com/billing

Upvotes: 0

CenterOrbit
CenterOrbit

Reputation: 6851

For others who find this question when their container didn't start the first time you deployed it: It's important to note that you need to have it listening on the environment variable PORT.

It appears that Cloud Run will dynamically map your container to a port at invocation, and the service that you're running needs to (dynamically) use this to serve it's content.

For reference, here's how I got the base Apache Docker image to work with Cloud Run to host a static site built via Node:

FROM node:lts AS build
COPY . .
RUN npm install
RUN npm run build

FROM httpd:latest
ENV PORT=80
RUN sed -i 's/80/${PORT}/g' /usr/local/apache2/conf/httpd.conf
COPY --from=build ./dist/ /usr/local/apache2/htdocs/

Upvotes: 3

wlhee
wlhee

Reputation: 2584

This means infrastructure (container manager) scales down the number instances when traffic drops.

It's safe to ignore.

Upvotes: 8

Related Questions