Courseiva
mediumMultiple ChoiceObjective-mapped

Diagnosing Latency Increase in Vertex AI Custom Containers

An e-commerce company uses a recommendation model deployed on Vertex AI Endpoints. The model's latency increases gradually over two weeks, causing timeouts. The model is served using a custom container. What is the most likely root cause and corrective action?

Quick Answer

The answer is a memory leak in the custom container, making memory monitoring and resource limits the corrective action. This is the most likely root cause because a gradual latency increase over two weeks, as opposed to a sudden spike, points to a slow accumulation of unreleased memory. As the leak grows, the Java or Python garbage collector in the container spends more time reclaiming space, causing longer GC pauses that degrade response times until timeouts occur. On the Google Professional Machine Learning Engineer exam, this scenario tests your understanding of Vertex AI custom container lifecycle management and the difference between resource exhaustion (gradual) and request spikes (sudden). A common trap is to blame the model itself or network issues, but the steady degradation over days is the hallmark of a memory leak. Memory tip: think “slow creep, not a sudden leap” to distinguish leaks from traffic bursts.

⚠ Common exam trap

Many exam-takers confuse a gradual latency increase with a traffic scaling issue (Option A), but the slow, steady degradation over weeks is the hallmark of a resource leak, not a demand spike.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The custom container has a memory leak; implement memory monitoring and set container resource limits.

A gradual increase in latency over two weeks, without a sudden spike, strongly indicates a memory leak in the custom container. As the leak accumulates, the container's garbage collection becomes less effective, leading to increased GC pauses and eventual timeouts. Setting resource limits and monitoring memory usage can prevent the container from exhausting host memory and causing performance degradation.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The model is receiving more traffic; scale the number of replicas.

    Why it's wrong here

    Traffic increase would show a sudden change, not gradual latency increase over two weeks.

  • The custom container has a memory leak; implement memory monitoring and set container resource limits.

    Why this is correct

    Memory leaks are a common cause of gradual performance degradation in long-running containers.

  • The Vertex AI endpoint has changed its URL; update the client application.

    Why it's wrong here

    The endpoint URL is static and does not change unless explicitly updated.

  • The model file size has grown due to feature engineering; reduce feature count.

    Why it's wrong here

    Model file size does not change unless a new model version is deployed.

About these practice questions

Courseiva writes every PMLE question from scratch — 990 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on PMLE

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Your team has deployed a text classification model on Vertex AI Endpoints. You notice that the model's latency has increased significantly over the last week, but the request rate has remained stable. Which of the following is the most likely cause?

hard
  • A.A sudden increase in the number of prediction requests
  • B.The model was replaced with a larger version without updating the endpoint
  • C.A change in the preprocessing logic that now includes a computationally expensive step
  • D.A misconfiguration in the autoscaling policy

Why C: A computationally expensive preprocessing step directly increases per-request latency on the inference path, even when request rate is stable. Vertex AI Endpoints execute user-provided preprocessing code before model inference, so adding a heavy operation (e.g., large regex, image resizing, or external API call) will linearly increase response time for every prediction.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PMLE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PMLE exam.