Bird
0
0

A developer sets the Cloud Run service's memory limit to 128Mi but the container crashes with out-of-memory errors. What should be done?

medium📝 Debug Q7 of 15
GCP - Cloud Run
A developer sets the Cloud Run service's memory limit to 128Mi but the container crashes with out-of-memory errors. What should be done?
ADecrease the memory limit to 64Mi
BIncrease the memory limit to a higher value like 512Mi or 1Gi
CRemove the memory limit entirely
DSwitch to a virtual machine instead
Step-by-Step Solution
Solution:
  1. Step 1: Understand memory limit impact

    If the container uses more memory than the limit, it crashes with out-of-memory errors.
  2. Step 2: Fix by adjusting memory limit

    Increasing the memory limit allows the container to use more memory and avoid crashes.
  3. Final Answer:

    Increase the memory limit to a higher value like 512Mi or 1Gi -> Option B
  4. Quick Check:

    Memory limit too low causes crashes; increase it [OK]
Quick Trick: Raise memory limit if container crashes due to out-of-memory [OK]
Common Mistakes:
  • Lowering memory limit instead of increasing
  • Removing limits without control
  • Switching services unnecessarily

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes