Skip to main content

All Questions

107 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7 votes
0 answers
2k views

Google Cloud Run with gunicorn/flask - getting intermittent 504s

I run a Flask application on Cloud Run with gunicorn and worker type gthread. On low level, this API just writes/retrieves entries from Datastore and Pubsub so all operations are light. The traffic is ...
cherry9090's user avatar
4 votes
1 answer
977 views

GCF function testing in python: failed to fetch builder image

I regularly use Google Cloud Run to write functions using Python. When testing I am usually able to click "Test Function" at the top of the page which opens a console window at the bottom of ...
Alex Mindock's user avatar
4 votes
0 answers
1k views

Cloud Run suddenly starts timing out when processing any request

We've been running a backend application on Cloud Run for about a year and a half now, and a month ago it suddenly stopped properly handling all requests at seemingly random times (about every couple ...
lblnd's user avatar
  • 93
4 votes
1 answer
3k views

Getting AttributeError: module 'proto' has no attribute 'module'

I'm trying to deploy a gRPC server to Cloud Run using Docker to create associated image. I am getting the following error when called: [] Traceback (most recent call last): > [] File "...
user3385136's user avatar
3 votes
1 answer
864 views

Why does sqlite (read-only) work running in Docker locally but not in Google Cloud Run?

I have a substantial sqlite database file (~2 million rows) which I query in a Rust application using rusqlite on Google Cloud Run, using a bundled version of sqlite. I do not add or write data, and ...
fizzbucket's user avatar
3 votes
1 answer
678 views

gRPC API server via Python can't worked

I have developed the gRPC API server via Python, Then build it to container and deploy on Cloud Run, Which my gRPC server are integrating with TensorFlow application. Actually the tensorflow for image ...
zzob's user avatar
  • 1,154
3 votes
0 answers
1k views

Docker on Google Cloud Run - Python Multiprocessing: OSError: [Errno 38] Function not implemented

I'm running a simple python web scraping script within a docker container on Cloud Run, it is invoked from the Cloud Scheduler and gives an error: File "/usr/local/lib/python3.8/multiprocessing/...
Dan's user avatar
  • 416
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
2 votes
0 answers
65 views

Cloud Run installs JS Modules every call

I have a cloud run function in python, and some JS files. The python code calls the JS code via processes. For some reason every time I call the cloud run function it seems to install jsdom which ...
Ahmed Zaidan's user avatar
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
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
2 votes
0 answers
194 views

Google Cloud Function slow download speed (Gen 2 Cloud Run)

I have written a gen 2 cloud function with which downloads a large YouTube video at 1080p. Because of this, it downloads the video and audio separately. I have maximized the resources devoted to the ...
Casey's user avatar
  • 23
2 votes
0 answers
478 views

Google Cloud Job logs splitting single line log into multiple lines

I am running a python script in GCP cloud jobs and the logs are getting weirdly split into multiple lines. Pretty much unreadable. Is there a way to avoid this log = getLogger() log_formatter = ...
gd vigneshwar's user avatar
2 votes
1 answer
517 views

Securize google cloud run API

I currently have a web application consisting of a frontend written in react and hosted on firebase hosting and a backend written in python/FastAPI on cloud run. Currently, the backend is public and ...
DownForProxy's user avatar
2 votes
2 answers
612 views

GCP cloud-run - Python code does not leave stack-trace when it crashes

I have a strange situation when I deploy a python flask based service on GCP cloud-run. I have some bug in my code that results in a crash as a part of processing some web API. But GCP cloud-run logs ...
sachinsdesai's user avatar
2 votes
1 answer
749 views

Issue when running Python script with Selenium over GCP Cloud Run

I have this python script in which I need to login and retrieve an access_token from an authentication server, the process is as follows, navigate to the authentication server with a given URL, embed ...
Kareem Rashwan's user avatar
2 votes
0 answers
2k views

GCP Cloud Run with command line arguments

I am new to Docker and GCP and I need to deploy a very basic Python app (calculator) on a Cloud Run service. I have 3 files calc.py, Dockerfile and requirements.txt. The application is taking 3 ...
Pierre56's user avatar
  • 567
1 vote
1 answer
71 views

GCP Cloud Run Container Behavior - ModuleNotFoundError

When Cloud Run runs a container image, the container fails differently than when I run it locally. I added this try/except in app/main.py to debug the divergent behaviors: print(f'cwd is {os.getcwd()}'...
harrolee's user avatar
  • 785
1 vote
0 answers
136 views

Error occured from python joblib.load : persistent IDs in protocol 0 must be ASCII strings In GCP cloud run

Overall: I tried to build BERT model with Cloudbuild and Cloudrun. I saved the model (parameter) and metadata (labels) at the GCP Cloud Storage. But, I encountered the error from load metadata.bin ...
ETKim's user avatar
  • 21
1 vote
0 answers
133 views

Prefect with Google Cloud Run: Creating a New Execution ID for Each Flow in a Single Job

I am currently using Prefect cloud to orchestrate different tasks, and I am deploying these tasks as jobs on Google Cloud Run using the CloudRun Push workpool. Here's the situation I am facing: every ...
razvanv's user avatar
  • 73
1 vote
1 answer
534 views

Increase timeout of API call to Cloud Run

I am triggering a cloud run job in GCP through airflow DAG. The job takes 30 minutes to execute, but the request timeout is 900 seconds so the DAG task fails. The error is: "Operation did not ...
Aym's user avatar
  • 135
1 vote
0 answers
143 views

How to upload a file larger than 32MB from django admin panel hosted in Cloud Run?

Problem I need to upload zip files with a size of ~800MB to a GCP Cloud Storage bucket using Django's admin panel. My Django API is hosted in Cloud Run, and I just found out Cloud Run has a request ...
Nicholas Kemp's user avatar
1 vote
0 answers
89 views

mlflow with Custom Domain - Google Cloud Load Balancing

I have the following problem. I create a mlflow server and deploy it on a google cloud run instance without any authentication (neither from google or the authentication from mlflow). And I could use ...
Thanh Long Phan's user avatar
1 vote
0 answers
143 views

Accessing Environment Variables in a Python Application on Google Cloud Platform

I have a Python project that I've deployed to Google Cloud Run. Everything works fine until I try to add and access an environment variable. I get an error when attempting to split the variable into ...
Roni Jack Vituli's user avatar
1 vote
1 answer
387 views

Deploy a Flask App on Cloud Run GCP with python

I am trying to create a Cloud Run that fetches photo URLs from a web service and then uploads them to a GCP bucket. On my local machine, it works perfectly fine, but during deployment, I encounter ...
Wysouf's user avatar
  • 11
1 vote
0 answers
559 views

Docker File in Google Cloud Run failing to install Dependencies - Failing on Pandas installation

I am trying to deploy a simple Python web app using Google's Cloud Run. However, I keep getting this error Failed to build the app. Error: exit status 1. Docker build ran into internal error. Please ...
Gandharv Bakshi's user avatar
1 vote
0 answers
121 views

Cloud Run stuck in a loop

In short, i have a Cloud Run a Python app that checks the file format as follows: if not(object_id.endswith('.csv') or object_id.endswith(".json")): msg = "Wrong file format!&...
Ismael Ziyani's user avatar
1 vote
1 answer
215 views

How can I run Django on a subpath on Google Cloud Run with load balancer?

I'll preface by noting that I have a system set up using Google Cloud Run + Load Balancer + IAP to run a number of apps on https://example.com/app1, https://example.com/app2, etc, and up to now I've ...
Nathan Lloyd's user avatar
  • 1,951
1 vote
0 answers
120 views

Google Cloud Run - Stockfish causes deploy failure

recently been trying to get Stockfish to run and receive HTTP requests on a web server and ran into an issue. importing and initilizing stockfish causes the deploy to fail, when locally ran it runs ...
Liam Foss's user avatar
1 vote
0 answers
173 views

SMTPServerDisconnected at /account/signup/ using django-allauth on Google Cloud Run and Workspace smtp-relay

I've attempted the various recommended config options and my SMTP relay works perfectly locally, but fails when deployed in my Google Cloud Run service with the following error: SMTPServerDisconnected ...
tomma-d's user avatar
  • 120
1 vote
0 answers
935 views

Getting Error 400 when sending GET request with json field from one Cloud Run to another

I am trying to send a request from one Cloud Run service to another. Both are running on Flask. My issue is that there is an email field that I need to send as part of the body of both PUT and GET ...
Asad Amir Khwaja's user avatar
1 vote
0 answers
493 views

Is there a way to manually kill a cloud run container through script, http request, etc.?

I have container, which i want to kill if the memory utilisation exceeds some value. I don't the want the container to be crashed, hence, any graceful way of doing this? If there is pythonic way that ...
Rohan Gupta's user avatar
1 vote
0 answers
575 views

Can't connect to local MySQL server through socket '/cloudsql/my-gcp-project:europe-west2:instance'

I'm getting an error when trying to connect to a MySQL server using a service in Cloud Run. This is the method I'm using to connect: def get_connection(self) -> mysql.connector.connection....
Matthew Best's user avatar
1 vote
1 answer
2k views

Flask / Docker: Error: Could not import 'project.main.python'

I am trying to build and run a flask application using docker on GCP. My file structure is as follows: > /project > static (contains some images) > templates (contains html files) >...
John Draper's user avatar
1 vote
0 answers
595 views

Cloud Run deploy failing when using --command flag

I am trying to deploy to cloud run using it's --command flag option (see https://cloud.google.com/sdk/gcloud/reference/run/deploy) but it fails anytime I try it. I do not know if I am not ...
charlie's user avatar
  • 175
1 vote
2 answers
1k views

cloud run - error while connecting to cloud sql

I am trying to connect to cloud sql from cloud run. However, I am getting the error, not sure what needs to be done. Code def create_database_connection(db_user, db_pass, db_name, ...
Gaurang Shah's user avatar
1 vote
1 answer
719 views

How to enable cloud debugger for python flask app on Cloud Run

I am trying to enable Google Cloud Debugger for a Flask app that I am running in Cloud Run. The project is a simple "Hello World" with Flask and Dockerfile. The code is synced for Bitbucket ...
Finglish's user avatar
  • 9,996
1 vote
0 answers
738 views

Why my Cloud Run got an Broken Pipe error?

I got an error on my Cloud Run, in my log it said Broken Pipe error, and when I check it which line that got an error on my Code, it on my db2.comit(). My cloud run always run well from 6 month ago ...
MADFROST's user avatar
  • 1,753
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
1 vote
1 answer
244 views

cloudrun failing with find_vma failed

my dockerfile for cloud run is as below. FROM alpine:3.10.5 USER root RUN apk update \ && apk upgrade \ && apk add --no-cache bash \ && apk add --no-cache --virtual=build-...
laks's user avatar
  • 13
1 vote
1 answer
301 views

Problem with downloading NLTK packages with Google Cloud Build and Dockerfile

I am using Google Cloud Run with Cloud Build where I want continuous deployment from Git. I am using a Docker file to build the image with Google Cloud Buildpack as I have to download Textblob Corpora ...
Vijay B's user avatar
  • 35
0 votes
0 answers
32 views

Python Google Cloud Function issue with "requested_run_time"

I have a process in GCP that can be summarized as: a log sink checks the logs for a specific log (daily GA4 table is added to the dataset) when sink gets the log, a pub/sub message is sent to trigger ...
Merijn Dimmendaal's user avatar
0 votes
0 answers
93 views

How to save a file to a cloud storage bucket from a cloud run function

I am super new to using google cloud and a very novice coder. I am trying to create an automated system that saves a graph as a jpeg in a cloud storage bucket (this will be a cloud run function that ...
Amy Lock's user avatar
0 votes
0 answers
22 views

Can custom headers be added to automatically generated Cloud Logging logs in Cloud Run?

A similar question was asked nearly two years ago, but there was no confirmed answer. Is it now possible to add custom attributes to the automatically generated logs in Cloud Run? I’m not referring to ...
code_taco's user avatar
0 votes
0 answers
46 views

How to get ordered logs using GCP Pub/Sub

I am using the GCP Pub/Sub to get real-time google logs into my Python application. I have created a log Sink that routes specific cloud run job logs into a Pub/Sub topic and I am subscribing to that ...
72mins's user avatar
  • 90
0 votes
0 answers
51 views

Cloud Run Fails to Import Custom Package from Artifact Registry (Terraform Deployment)

I'm deploying a Cloud Run function using Terraform, and the function depends on a custom Python package that we uploaded to Google Artifact Registry using Twine. However, the deployment fails with the ...
Daniel's user avatar
  • 5,401
0 votes
0 answers
85 views

Is it possible to load a sentence transformer model from google cloud storage bucket mounted to a cloud run instance

Have saved a sentence transformer model from hugging face to a google cloud storage bucket with hierarchical namespace enabled. This bucket is then mounted to a google cloud run instance as a volume ...
pmt1's user avatar
  • 1
0 votes
0 answers
138 views

How to authenticate and get credentials with Google OAuth 2.0 running in Cloud Run?

First of all, I'm very new to APIs and server settings. I'm trying to get Google APIs credentials using the function I've made to gain access to use the Google Tasks API in my Python script (not shown ...
Mirkyly's user avatar
  • 53
0 votes
0 answers
194 views

GCP pub-sub errors

I am building a simple webapp that accepts HTTP POSTs and should trigger a Cloud Pub-Sub event. Without pub-sub, the app deploys fine and I can reach the endpoint. I've created a sample functions. I'...
Peter's user avatar
  • 1,128
0 votes
0 answers
73 views

Fastapi on GCP cloud run not killing timeout request

we have a simple fastapi application deployed on GCP cloud run, The cloud run has a timeout of 15s but sometimes the downstream API call done by fastapi exceed this time. We are experiencing that once ...
Paolo Fusari's user avatar