Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notes on deploying to Google Cloud Run #320

Open
wlhong-allo opened this issue Feb 15, 2025 · 0 comments
Open

Notes on deploying to Google Cloud Run #320

wlhong-allo opened this issue Feb 15, 2025 · 0 comments

Comments

@wlhong-allo
Copy link

Figured that i might share how i got it worked to save some fellows hours.

I spent 2 days getting below errors running on Cloud Run:

"Initialize error: Timed out after 30000 ms while trying to connect to the browser! Only Chrome at revision r1045629 is guaranteed to work."
OR
"Timed out waiting for nested object"

It turned out its because of the CPU allocation mechanism on Cloud Run.

check this out:
https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#running-puppeteer-on-google-cloud-run

You need to enable Google Cloud Run to always allocate dedicated CPU for you otherwise the process will exit as soon as a response is returned without waiting for the puppeteer event to come back.

As of current GCP web UI, goto your cloud run service > Edit & Deploy New Revision > under "Billing" section, select "Instance-based" instead of "Request-based"

Note that it impact your GCP cost because now there are CPU resources always dedicated for your service:

https://cloud.google.com/run/docs/configuring/billing-settings

Hope it helps~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant