ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 142 - Professional Cloud DevOps Engineer discussion

Report
Export

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?

A.
Add high memory compute nodes to the cluster.
Answers
A.
Add high memory compute nodes to the cluster.
B.
Increase the memory limit in the application deployment.
Answers
B.
Increase the memory limit in the application deployment.
C.
Add Cloud Trace to the application, and redeploy.
Answers
C.
Add Cloud Trace to the application, and redeploy.
D.
Increase the CPU limit in the application deployment.
Answers
D.
Increase the CPU limit in the application deployment.
Suggested answer: B

Explanation:

The correct answer is B. Increase the memory limit in the application deployment.

The application is experiencing a memory leak, which means that it is allocating memory that is not freed or reused. This causes the heap usage to grow constantly until it reaches the memory limit of the pod, which triggers a restart by Kubernetes. Increasing the memory limit in the application deployment can help mitigate the problem by allowing the application to run longer before reaching the limit. However, this is not a permanent solution, as the memory leak will still occur and eventually exhaust the available memory. The best solution is to identify and fix the source of the memory leak in the application code, using tools like Cloud Profiler and pprof12.

Using Cloud Profiler with Go, Troubleshooting memory leaks. Profiling Go Programs, Heap profiles.

asked 18/09/2024
Daniel Ramirez
46 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first