Troubleshoot pull delivery issues

Use the gcpdiag tool to discover and fix potential delivery issues for pull subscriptions.

Use the gcpdiag tool

gcpdiag is an open source tool. It is not an officially supported Google Cloud product. You can use the gcpdiag tool to help you identify and fix Google Cloud project issues. For more information, see the gcpdiag project on GitHub.

The gcpdiag tool helps you discover Pub/Sub pull delivery issues by performing the following checks:

  • Quota errors: Evaluates Logs Explorer logs to check for any quota errors in regions and zones.
  • Throughput qualification: Performs checks on the delivery latency health of a subscription.

For a list of gcpdiag pull delivery evaluation steps, see Potential steps.

Run the gcpdiag command

You can run the gcpdiag command from Google Cloud CLI or within a Docker container.

Google Cloud console

  1. Complete and then copy the following command.
  2. gcpdiag runbook pubsub/pull-subscription-delivery \
      --project=PROJECT_ID \
      --parameter subscription_name=SUBSCRIPTION_NAME
  3. Open the Google Cloud console and activate Cloud Shell.
  4. Open Cloud console
  5. Paste the copied command.
  6. Run the gcpdiag command, which downloads the gcpdiag docker image, and then performs diagnostic checks. If applicable, follow the output instructions to fix failed checks.

Docker

You can run gcpdiag using a wrapper that starts gcpdiag in a Docker container. Docker or Podman must be installed.

  1. Copy and run the following command on your local workstation.
    curl https://gcpdiag.dev/gcpdiag.sh >gcpdiag && chmod +x gcpdiag
  2. Execute the gcpdiag command.
    ./gcpdiag runbook pubsub/pull-subscription-delivery \
      --project=PROJECT_ID \
      --parameter subscription_name=SUBSCRIPTION_NAME

View available parameters for this runbook.

Replace the following:

    • PROJECT_ID: The ID of the project to evaluate
    • SUBSCRIPTION_NAME: The name of the subscription to evaluate in your project

Useful flags:

For a list and description of all gcpdiag tool flags, see the gcpdiag usage instructions.