nerdexam
Google

PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #164

As a Site Reliability Engineer, you support an application written in Go that runs on Google Kubernetes Engine (GKE) in production. After releasing a new version of the application, you notice the app

The correct answer is C. Increase the memory limit in the application deployment.. When an application constantly grows its heap usage until it restarts, indicating a memory leak or insufficient memory, the immediate action to mitigate the restarts is to increase the memory limit in the application's Kubernetes deployment.

Submitted by thandi_sa· Apr 18, 2026Applying site reliability engineering principles to a service

Question

As a Site Reliability Engineer, you support an application written in Go that runs on Google Kubernetes Engine (GKE) in production. After releasing a new version of the application, you notice the application runs for about 15 minutes and then restarts. You decide to add Cloud Profiler to your application and now notice that the heap usage grows constantly until the application restarts. What should you do?

Options

  • AIncrease the CPU limit in the application deployment.
  • BAdd high memory compute nodes to the cluster.
  • CIncrease the memory limit in the application deployment.
  • DAdd Cloud Trace to the application, and redeploy.

How the community answered

(22 responses)
  • A
    5% (1)
  • B
    5% (1)
  • C
    77% (17)
  • D
    14% (3)

Why each option

When an application constantly grows its heap usage until it restarts, indicating a memory leak or insufficient memory, the immediate action to mitigate the restarts is to increase the memory limit in the application's Kubernetes deployment.

AIncrease the CPU limit in the application deployment.

Increasing the CPU limit would address CPU starvation, but the problem description clearly indicates a memory issue (heap usage growth), not a CPU bottleneck.

BAdd high memory compute nodes to the cluster.

Adding high memory compute nodes to the cluster provides more total memory capacity, but if the application's *deployment* memory limit is too low, it will still be OOMKilled regardless of the underlying node capacity.

CIncrease the memory limit in the application deployment.Correct

The symptoms described (constant heap usage growth leading to restarts) clearly point to a memory issue, likely a memory leak or the application requiring more memory than allocated. Increasing the memory limit in the application's Kubernetes deployment provides the container with more RAM, preventing it from being OOMKilled (Out Of Memory Killed) by Kubernetes and thus stopping the restarts.

DAdd Cloud Trace to the application, and redeploy.

Cloud Trace is used for distributed tracing to understand latency and execution paths, which is valuable for performance analysis but not directly for mitigating a memory exhaustion issue causing restarts, especially when a profiler already identified heap growth.

Concept tested: GKE application memory management and OOMKills

Source: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits

Topics

#Troubleshooting#Memory Management#Cloud Profiler#Kubernetes Resource Limits

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVOPS-ENGINEER Practice