I have deployed the app from GitHub to GCP Cloud Run using GitHub Actions. After running the application for a minute, Cloud Run shuts down my application. I checked my credentials and everything is ok there. How to keep running the application on Cloud Run?

I also have provided HTTP client like this:

const requestListener = function (req, res) {
    res.end("My cool server!");
const app = http.createServer(requestListener);
app.listen(port, () => {
    run(); // RUN BOT CLIENT
    console.log(`Bot is running. GCP CLoud Run port: ${port}`);
  • Can you explain "shuts down the app"? Also have you checked Discord Bot + Google Cloud Run: "Container failed to start." ?
    – Dharmaraj
    1 hour ago
  • Yes, and I have started an HTTP client as well. I will edit my question to provide that code.
    – dsha256
    1 hour ago
  • "In Cloud Run, each revision is automatically scaled to the number of container instances needed to handle all incoming requests. When a revision does not receive any traffic, by default it is scaled in to zero container instances. However, if desired, you can change this default to specify an instance to be kept idle or "warm" using the minimum instances setting." See cloud.google.com/run/docs/about-instance-autoscaling
    – metad00r
    24 mins ago


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.