"The request failed because either the HTTP response was malformed or connection to the instance had an error."
- What Google says it means
- A connection problem with the container instance
- Go to
- Fix 1
Find why Cloud Run returns 503: connection or malformed response errors, memory limits, instance and concurrency limits, credentials, with gcloud commands to fix.
A Cloud Run 503 has several documented causes, each with its own log message: a malformed response or broken instance connection, instances killed for exceeding memory, a service at its maximum instance limit under high concurrency, or missing default credentials. Read the log text, match it to the table, then change memory, concurrency, max instances or timeouts.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
LIVENESS HTTP probe failed 1 time consecutively for container CONTAINER_NAME on port 8080. The instance has been shut down.. For a failed probe, enable logging and tracing to find the cause of the latency, and increase the probe's timeout period.server.timeout through server.setTimeout; server.setTimeout(0) gives an unlimited timeout.[CRITICAL] WORKER TIMEOUT.varlog/system logs and increase the memory limit if instances are exceeding it. Google notes that files written to the local file system count toward available memory, including log files written outside /var/log/* and /dev/log.For the max-instance 503, Google says to increase the maximum number of container instances for the service, or lower the service's concurrency. The default maximum concurrent requests per instance is 80, and --concurrency default reverts to it.
gcloud run services update SERVICE --timeout=TIMEOUT# more instances
gcloud run services update SERVICE --max-instances MAX-VALUE
# fewer simultaneous requests per instance
gcloud run services update SERVICE --concurrency 1
# back to the default of 80
gcloud run services update SERVICE --concurrency defaultgcloud auth application-default login, or point GOOGLE_APPLICATION_CREDENTIALS at a credential JSON file in your project. On Cloud Run itself, Google says to configure the service identity.If your billing account reached a spend cap, Cloud Run resources might return HTTP 5xx. Check the Cloud Run console for an alert banner, review budgets in the Cloud Billing console, and lift or adjust the cap. After lifting it, Google says it might take up to 30 minutes for the resource to resume serving traffic.
In Cloud Logging, open a failing request and read the text. It maps to a row in the first table.
Open the service's Container instance count and look for a flat line at your maximum.
Memory, concurrency, max instances or timeout, then redeploy and test again.
A 503 is a 5xx to Google, which says 5xx and 429 responses "prompt Google's crawlers to temporarily slow down with crawling". Indexed URLs are kept for a while and eventually dropped if errors persist. See 503 service unavailable and 5xx server errors.
4 questions people ask next, answered from the sources on this page.
Google documents several causes: a malformed response or connection error to the instance, instances exceeding memory, the service reaching its maximum instance limit under high concurrency, missing default credentials, and billing spend caps. The Cloud Logging message identifies which.
Increase the service's maximum instances, or lower concurrency with --concurrency. Google says the max-instance 503 can happen when instances are under high CPU load and cannot process all requests.
No. Google documents 429 when no instance is available because the max-instances limit was hit, and 503 for the messages in the first table. Check the log text rather than the number.
Default 5 minutes (300 seconds), extendable to 60 minutes (3600 seconds). A request over it returns 504, not 503.
Run the free audit, then approve the fixes. Every change can be undone.