Skip to main content

All Questions

Filter by
Sorted by
Tagged with
27 votes
7 answers
13k views

How to generate a Blob signed url in Google Cloud Run?

Under Google Cloud Run, you can select which service account your container is running. Using the default compute service account fails to generate a signed url. The work around listed here works on ...
sww314's user avatar
  • 1,342
1 vote
3 answers
1k views

Run a Python gRPC server on Google Cloud Run

I have a basic, proof-of-concept Python gRPC server. When I run my docker container locally, I can make requests to the server and receive responses on the exposed port. I can successfully deploy ...
Dan's user avatar
  • 83
30 votes
5 answers
37k views

"[CRITICAL] WORKER TIMEOUT" in logs when running "Hello Cloud Run with Python" from GCP Setup Docs

Following the tutorial here I have the following 2 files: app.py from flask import Flask, request app = Flask(__name__) @app.route('/', methods=['GET']) def hello(): """Return a ...
jminardi's user avatar
  • 1,066
4 votes
1 answer
2k views

Discord Bot + Google Cloud Run: "Container failed to start."

I'm attempting to deploy a simple Discord bot written in python and containerized via Docker to Google Cloud Run. The Dockerfile is very simple: FROM python:3.9 WORKDIR /app COPY requirements.txt ...
mtbell's user avatar
  • 105
2 votes
0 answers
297 views

How can I get the CPU & Memory usage from a service in Google Cloud Run using python?

I want to create a resource tracker for my pipelines (the majority are deployed in a Cloud Run Service). so that I can save a log every time they run with the CPU & Memory usage, something like ...
lapiceroazul4's user avatar
1 vote
0 answers
233 views

google cloud debugger snapshot reports "No code found at line...", python on managed cloud run

I have a github repo which triggers cloud run build, deployed via console to cloud run. In the debugger setup, I created a GC source repository mirror. The setup seems to be good. Pushed changes ...
mohawkTrail's user avatar
15 votes
5 answers
20k views

Simplest way to perform logging from Google Cloud Run

I followed this guide https://firebase.google.com/docs/hosting/cloud-run to setup cloud run docker. Then I tried to follow this guide https://cloud.google.com/run/docs/logging to perform a simple log. ...
Zorik's user avatar
  • 247
8 votes
1 answer
6k views

How to increase the memory limits in Google Cloud Run?

I'm building a simple Flask based app using Cloud Run + Cloud Firestore. There is one method that brings a lot of data, and the logs are showing this error: `Memory limit of 244M exceeded with 248M ...
marcosluis2186's user avatar
5 votes
4 answers
4k views

How can I get the user's IP-Address in my Cloud-Run Flask app?

I have a Flask app running via Google Cloud Run and I need to know the user's IP-Address. I am using gunicorn as my Server. I have tried the following code: request.remote_addr request.environ['...
nilsf's user avatar
  • 138
4 votes
1 answer
2k views

Google Cloud Run Jobs logging splits Exception MESSAGES with multiple lines into multiple log entries

Several days ago, a Python RuntimeError was raised in one of my company's Cloud Run jobs which stopped it. Cloud Run's logging, unfortunately, handled that RuntimeError in a bad way. It correctly put ...
HaroldFinch's user avatar
3 votes
0 answers
3k views

unable to run selenium chrome-driver on google-cloud-run

I have a docker container that runs a working selenium chrome driver script, however when the same image is deployed to Google Cloud Run I encounter the following error. webdriver.Chrome('/home/...
Fry's user avatar
  • 73
3 votes
2 answers
15k views

Cloud Endpoints returning 401 Jwt issuer is not configured

I am trying to set up service to service authentication so an external application can make requests to a Cloud Run application (behind a Cloud Endpoints API gateway). I have followed the Cloud ...
beano's user avatar
  • 952
2 votes
0 answers
42 views

Support CONNECT flask server

I am trying to build a basic proxy server thats accessible form the internet to forward requests but also log them to firebase database. I deployed my code on Google Cloud Run by creating an instance ...
Ahmed Zaidan's user avatar
2 votes
1 answer
1k views

How to fix missing port issue with GCP Cloud Function (Gen2) when deployed?

I am trying to deploy a cloud function (gen2) in GCP but running into the same issue and get this error with each deploy when Cloud Functions sets up Cloud Run: The user-provided container failed to ...
DrewS's user avatar
  • 93
2 votes
2 answers
2k views

Tracing a Python gRPC server deployed on Cloud Run with OpenTelemetry

I'm running a Python gRPC server on Cloud Run and attempting to add instrumentation to capture trace information. I have a basic setup currently, however I'm having trouble making use of propagation ...
dkhaupt's user avatar
  • 2,358
2 votes
2 answers
5k views

How to resolve "container failed to start error" while deploying a docker image to cloud run

Problem statement: I have created a docker application ( a simple python code) and trying to deploy and automate run using Google Cloudrun but each time during deployment I see the below error : ...
analyst045's user avatar
1 vote
1 answer
626 views

Is there a way to download TextBlob corpora to Google Cloud Run?

I am using Python with TextBlob for sentiment analysis. I want to deploy my app (build in Plotly Dash) to Google Cloud Run with Google Cloud Build (without using Docker). When using locally on my ...
Vijay B's user avatar
  • 35
1 vote
2 answers
2k views

How to obtain Google Cloud Run service URL with Python

I would like to obtain the URL of my Cloud Run service programmatically so I only need to hard code the name of the service and not its URL. This is so I can have the same code deployed in my test and ...
LlamaD's user avatar
  • 442
1 vote
2 answers
1k views

Google Cloud Run: script requires little memory, yet reaches memory limit

On Google Cloud Run, I have a Python script that requires a small amount of memory. According to tracemalloc the peak memory is of the order of 20 Mb. Yet, about 1 of 4 runs fails: "Memory limit ...
Maxwell86's user avatar
  • 153
1 vote
1 answer
1k views

Slow responses using Using Google Cloud Run, FastAPI and the Meta Whatsapp API

This is quite a sepcific problem but I'm wondering if anyone else has encountered it. I'm using the Whatsapp Cloud API (https://developers.facebook.com/docs/whatsapp/cloud-api/) for a question-answer ...
millsy's user avatar
  • 372
0 votes
1 answer
2k views

Cannot hit grpc server after successfully deploying to cloud run

Similar situation to what was asked here, however the solution described there do not work in my case. I want to run a grpc server on google cloud run, and be able to call it. I have a basic python ...
Zhe Yuan Lin's user avatar
0 votes
2 answers
3k views

Cloud Run with Gunicorn Best-Practise

I am currently working on a service that is supposed to provide an HTTP endpoint in Cloud Run and I don't have much experience. I am currently using flask + gunicorn and can also call the service. My ...
F3Tz's user avatar
  • 38
0 votes
0 answers
120 views

Google Cloud Debugger snapshot reports error “No code found at line …”

I'm using Cloud Debugger for a Python app (FastAPI) deployed to Cloud Run for Anthos. File source-context.json is used to specify the commit for Cloud Debugger (it was updated before deploying). ...
Stoliarov Oleh's user avatar
0 votes
2 answers
3k views

Log to Cloud Logging with correct severity from Cloud Run Job and package used in the job

What we are trying: We are trying to Run a Cloud Run Job that does some computation and also uses one our custom package to do the computation. The cloud run job is using google-cloud-logging and ...
Devesh Poojari's user avatar
-1 votes
1 answer
625 views

Google Cloud Run returning Server Unavailable Occasionally

I am running a Flask app at https://recycler-mvdcj7favq-uc.a.run.app/ on Google Cloud Run and occasionally I get 503 server unavailable while refreshing a few times seems to load the page. Also, ...
Kevin Lu's user avatar
-1 votes
1 answer
315 views

How do I structure a repo with Cloud Run needing higher level code?

I have added code to a repo to build a Cloud Run service. The structure is like this: I want to run b.py in cr. Is there any way I can deploy cr without just copying b.py into the cr directory? (I ...
schoon's user avatar
  • 3,373