Skip to content

Issues deploying Cloud Functions (Container Healthcheck failed) #9735

Closed

Description

@Nushio

[REQUIRED] Environment info

firebase-tools:
Issue noticed on 14.4.0 (Github Action) but also happens on 15.2.1 (latest, m1 mac)

Platform:
Github Action, m1 Macs, I assume others.

[REQUIRED] Test case

I.O.U.
We have a big functions folder with lots (164) functions grouped by category. I'm not sure what the best way to replicate this could be other than creating a sample project with lots of functions.

[REQUIRED] Steps to reproduce

When deploying a single function, or a small number of functions, the deployment works fine.
When deploying a whole group of functions (around 20 at a time), we sometimes get this error on one or two:

Could not create or update Cloud Run service observers-functionamehere, Container Healthcheck failed. The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable within the allocated timeout. This can happen when the container port is misconfigured or if the timeout is too short. The health check timeout can be extended. Logs for this revision might contain more information.

The cloud function logs are unfortunately just as useless as that error message:

Ready condition status changed to False for Revision observers-functionamehere-00046-lit with message: The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable within the allocated timeout. This can happen when the container port is misconfigured or if the timeout is too short. The health check timeout can be extended. Logs for this revision might contain more information.

Deploying that function by itself deploys fine, and deploying smaller batches also works fine but it's unbearably slow to deploy 165 functions in batches of 10. We already capped it at 50 because we couldn't reliably deploy everything at once.

Additionally, I tried changing from node 22 to 24 (same issues), and adding a timeoutSeconds value to each function of 6 mins still doesn't fix the deployment issues.

[REQUIRED] Expected behavior

Deploys work

[REQUIRED] Actual behavior

Deploys work.... sometimes! :(
We last deployed "normally" around Jan 9. On Jan 12 we started having deploy issues.

[debug] [2026-01-14T00:55:09.916Z] Functions deploy failed.
[debug] [2026-01-14T00:55:09.916Z] {
"endpoint": {
"id": "cron-functionname",
"project": "project-name",
"region": "us-central1",
"entryPoint": "cron.functionname",
"platform": "gcfv2",
"runtime": "nodejs24",
"scheduleTrigger": {
"schedule": "0 10,14 * * *",
"timeZone": "America/Denver",
"retryConfig": {}
},
"labels": {
"deployment-tool": "cli-firebase"
},
"secretEnvironmentVariables": [
// secrets
],
"serviceAccount": null,
"ingressSettings": null,
"availableMemoryMb": 512,
"timeoutSeconds": 1800,
"maxInstances": null,
"minInstances": null,
"concurrency": 80,
"vpc": null,
"environmentVariables": {
//env vars
},
"codebase": "default",
"runServiceId": "cron-functionname",
"cpu": 1,
"securityLevel": "SECURE_ALWAYS",
"targetedByOnly": false,
"hash": "9af75613c451d96dcdc751be2268b57ad06de40b"
},
"op": "update",
"original": {
"name": "FirebaseError",
"children": [],
"exit": 1,
"message": "Build failed with status: FAILURE and message: installing pnpm: (error ID: ea1a4e17):\nfetching available pnpm versions: getting url "https://registry.npmjs.org/pnpm\": reading response: read tcp 192.168.10.2:47866->104.16.9.34:443: read: connection reset by peer. For more details see the logs at https://console.cloud.google.com/cloud-build/builds;region=us-central1/ae8734f1-fe6b-40af-b1eb-4aec09d431ab?project=659984539941.",
"original": {
"code": 13,
"message": "Build failed with status: FAILURE and message: installing pnpm: (error ID: ea1a4e17):\nfetching available pnpm versions: getting url "https://registry.npmjs.org/pnpm\": reading response: read tcp 192.168.10.2:47866->104.16.9.34:443: read: connection reset by peer. For more details see the logs at https://console.cloud.google.com/cloud-build/builds;region=us-central1/ae8734f1-fe6b-40af-b1eb-4aec09d431ab?project=659984539941."
},
"status": 13,
"code": 13
}
}

[debug] [2026-01-14T00:55:09.916Z] {
"endpoint": {
"id": "https-functionname",
"project": "project-name",
"region": "us-central1",
"entryPoint": "https.functionname",
"platform": "gcfv2",
"runtime": "nodejs24",
"httpsTrigger": {},
"labels": {
"deployment-tool": "cli-firebase"
},
"secretEnvironmentVariables": [
// secrets
],
"serviceAccount": null,
"ingressSettings": null,
"availableMemoryMb": 512,
"timeoutSeconds": 360,
"maxInstances": null,
"minInstances": 1,
"concurrency": 80,
"vpc": null,
"environmentVariables": {
// env vars
},
"codebase": "default",
"runServiceId": "https-functionname",
"cpu": 1,
"securityLevel": "SECURE_ALWAYS",
"targetedByOnly": false,
"hash": "da6f2dc9feab56cb6d910fe87c0ca53ab0c48a11"
},
"op": "update",
"original": {
"name": "FirebaseError",
"children": [],
"exit": 1,
"message": "Could not create or update Cloud Run service https-functionname, Container Healthcheck failed. The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable within the allocated timeout. This can happen when the container port is misconfigured or if the timeout is too short. The health check timeout can be extended. Logs for this revision might contain more information.\n\nLogs URL: https://console.cloud.google.com/logs/viewer?project=project-name&resource=cloud_run_revision/service_name/https-functionname/revision_name/https-functionname-00112-vem&advancedFilter=resource.type%3D%22cloud_run_revision%22%0Aresource.labels.service_name%3D%https-functionname%22%0Aresource.labels.revision_name%3D%https-functionname-00112-vem%22 \nFor more troubleshooting guidance, see https://cloud.google.com/run/docs/troubleshooting#container-failed-to-start",
"original": {
"code": 3,
"message": "Could not create or update Cloud Run service https-functionname, Container Healthcheck failed. The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable within the allocated timeout. This can happen when the container port is misconfigured or if the timeout is too short. The health check timeout can be extended. Logs for this revision might contain more information.\n\nLogs URL: https://console.cloud.google.com/logs/viewer?project=project-name&resource=cloud_run_revision/service_name/https-functionname/revision_name/https-functionname-00112-vem&advancedFilter=resource.type%3D%22cloud_run_revision%22%0Aresource.labels.service_name%3D%22https-functionname%22%0Aresource.labels.revision_name%3D%22https-functionname-00112-vem%22 \nFor more troubleshooting guidance, see https://cloud.google.com/run/docs/troubleshooting#container-failed-to-start"
},
"status": 3,
"code": 3
}
}

Activity

  1. maylorsan commented on Jan 14, 2026

    @maylorsan
    Contributor

    We’re experiencing the same issue starting yesterday, and nothing has changed on our side.

    We deploy ~20 functions at a time, and a few of them fail seemingly at random, sometimes the same deploy works fine with no changes. Could this be related to API limits / rate limiting or some kind of backend throttling?

    cc: @joehan @taeold

  2. geehwan commented on Jan 14, 2026

    @geehwan

    We started experiencing this as well on 1/11 - it was all working fine before that date.

    So far we have tried increasing cpu, memory, disabling minInstances, etc. But nothing has worked. Deploying one by one or in small batches mostly works, but sometimes fails and we have to retry certain functions. Looking for some help if anyone has tips, thanks!

  3. Nushio commented on Jan 14, 2026

    @Nushio
    Author

    I hesitated from creating this issue on Monday but after spending all of yesterday and seeing others having the same issue I wish I did reach out sooner.

    We've tried everything as well, even switching from pnpm to npm, but the inconsistent deploys are very frustrating.

    We already use function groupings to deploy all crons (about 29 functions), onRequest, onCalls, etc, but even some of the smaller (~20ish) function groups have failed to deploy consistently, our github actions are full of retries.

  4. Nushio commented on Jan 14, 2026

    @Nushio
    Author

    I'd just like to add that deploys seem to be working fine today, but definitely presented problems on monday and tuesday.
    Any comment from a firebaser that can confirm if action's been taken on the backend?

  5. geehwan commented on Jan 14, 2026

    @geehwan

    It worked for us just now as well. Seems like something on firebase end? Lots of hours wasted on this :( thanks so much for posting this update and the original report @Nushio

  6. aalej commented on Jan 14, 2026

    @aalej
    Contributor

    Hey folks, sorry to hear you encountered this issue and thanks @Nushio for reporting this. I’ve tried to reproduce this, but deployments don’t seem to raise errors, so it does seem to be fixed(tried deploying ~100 functions at a time). Based on the information provided, my guess is a backend change may have caused this. Though, I’ll check with someone on our engineering team to confirm.

    I see in the debug logs that the failed deployment is in us-central1 region, did anyone else encounter the issue when deploying to a different region are you also using this region? Also, is anyone currently still encountering this issue when deploying?

  7. geehwan commented on Jan 14, 2026

    @geehwan

    We are using the same region. us-cetral1

  8. aalej commented on Jan 15, 2026

    @aalej
    Contributor

    Quick update here, the issue should be fixed in all regions

    January 14, 2026 at 10:24:46 PM UTC+8
    Google Cloud Run and Google Cloud Functions customers were experiencing occasional deployment failures.
    
    The issue with Cloud Run, Google Cloud Functions has been resolved for all affected users as of Wednesday, 2026-01-14 06:17 PST.
    

    You should be able to see the summary of the incident in GCP console's Service Health page by accessing https://console.cloud.google.com/servicehealth/incidentDetails/projects%2FPROJECT_ID%2Flocations%2Fglobal%2Fevents%2FQSDBCRL?project=PROJECT_ID

    I'll go ahead and close this, but if you're still encountering the issue, feel free to leave a comment.

  9. josephconderlms commented on Feb 1, 2026

    @josephconderlms

    I am now experiencing this problem since January 30th. Last successful deploy was on January 6th. It is happening with every function i deploy and we only have about 20. The logs indicate that the healthcheck failed and it does not start up the Cloud container on port 8080 successfully- the details show that it fails to find firebase-functions/v2/https (I have verified the configurations all look correct and that has never been a problem before). We are also running on us-central1.

  10. nicooo91 commented on Feb 2, 2026

    @nicooo91

    I am now experiencing this problem since January 30th. Last successful deploy was on January 6th. It is happening with every function i deploy and we only have about 20. The logs indicate that the healthcheck failed and it does not start up the Cloud container on port 8080 successfully- the details show that it fails to find firebase-functions/v2/https (I have verified the configurations all look correct and that has never been a problem before). We are also running on us-central1.

    Same for me, since at least yesterday (Didn't perform deploy before)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions