ERR_RECIPE_CODE_K8S_OOM: Out of memory for code recipe on Kubernetes

Description

Kubernetes terminated the pod running a containerized code recipe because it exceeded its configured memory limit. Kubernetes reports the termination reason OOMKilled and typically reports exit code 137.

This error can affect Streaming Python recipes and other supported code recipes running on Kubernetes.

Remediation

  • Review the recipe code for excessive or unbounded memory allocation.

  • Avoid loading unnecessarily large datasets or accumulating data indefinitely in memory.

  • For streaming code, bound retained batches, buffers, caches, and other in-memory state.

  • In the recipe’s Advanced tab, check Container configuration to identify the configuration used for the run. If the recipe inherits the project default, Dataiku displays the resolved configuration name in parentheses.

  • If the workload needs more memory, ask an administrator to open Administration > Settings > Containerized execution > Containerized execution configs, find that configuration, and increase Memory limit under Resources for Kubernetes containers. The Kubernetes cluster must have sufficient capacity. See Setting up containerized execution configurations for more information.

  • Rerun the recipe after changing the code or memory configuration.