Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

cloud run is getting stuck and have to redeploy to restart

Our cloud-run service is getting stuck sometimes and requires us to redeploy the whole service to get it restarted.


Screenshot 2023-10-20 at 4.04.16 PM.png

0 2 736
2 REPLIES 2

Hi @sakkeer-sanoft,

Welcome to Google Cloud Community!

There are a few possible reasons why your Cloud Run service might be getting stuck and requiring a redeploy to restart.

  • Resource limits: Make sure that your service has enough resources (memory and CPU) to handle its workload.
  • Concurrency settings: Cloud Run limits the number of concurrent requests that your service can handle.
  • Long-running requests: If your service handles long-running requests, it's important to make sure that your code is designed to handle these requests efficiently.
  • External dependencies: If your service depends on external resources, such as databases or APIs, make sure that these resources are available and responsive.
  • Bugs in your code: It's also possible that there is a bug in your code that is causing your service to become unresponsive.

Additionally, you can try to reproduce the issue locally and debug your code. If you're still having problems, you can collect logs from your Cloud Run service and use them to debug the issue.

@christianpaula at the moment we moved our test environment to cloud run and it has very less traffic and don't think any of the above items are causing the issue. 

At the moment we added a periodic health check call not to get the service stuck. and it worked for us. 

But still don't have enough confidence to migrate our production to cloud run, from the google app engine.