容器化进程被信号 119 终止

Containerized process terminated by signal 119

当我们尝试从 sql 服务器提取大型 table 时,出现错误:

Containerized process terminated by signal 119.

据我了解,kubernetes 容器对每个 POD 分配给内存的 GB 有限制。 因此,假设如果我们对内存有限制并且 table 大小预计会更大,那么我们有什么选择?

A Container can exceed its memory request if the Node has memory available. But a Container is not allowed to use more than its memory limit. If a Container allocates more memory than its limit, the Container becomes a candidate for termination. If the Container continues to consume memory beyond its limit, the Container is terminated. If a terminated Container can be restarted, the kubelet restarts it, as with any other type of runtime failure. [source]

有两个可能的原因:

  • 您的容器超出了 spec.containers[].resources.limits.memory 字段中设置的内存限制;或
  • 您的容器超出了节点可用内存。

在第一种情况下,您可以通过更改 spec.containers[].resources.limits.memory 值来增加内存限制。

在第二种情况下,您可以增加节点的资源或确保 pod 被调度到具有更多可用内存的节点上。