Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Cloud Run Cold Starts to Datastore Take Tens of Seconds #481

@chrishiestand

Description

@chrishiestand

This is a similar issue to here, except slower: #9

To reproduce the problem I used @JustinBeckwith 's code from here #9 (comment) as a template.

Environment details

  • OS: Cloud Run (hosted)
  • Node.js version: 12.9.0
  • npm version: 6.10.2
  • @google-cloud/datastore version: 4.2.0

Steps to reproduce

  1. Setup Datastore in a gcp project (creating a test entity is optional)
  2. Setup Cloud Run in a gcp project (you can use this to build a docker image: https://github.com/chrishiestand/cloud-run-datastore-latency-test )
    A. Be sure to populate the env vars KIND and ID
    B. The Cloud Run service account must have datastore access, so add permissions if necessary
  3. Hit the Cloud Run URL in your browser e.g. https://cloud-run-test-xyz-ue.a.run.app/

Look at the getTime that is returned, for me, it is waaay too slow on cold start (ranges from ~15-40 seconds). Warmed containers answer in a reasonable amount of time e.g. ~20-50 milliseconds.

Thanks!

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the googleapis/nodejs-datastore API.perfstatus: blockedResolving the issue is dependent on other work.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions