Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Envoy proxy is using too much memory

Envoy is using all the memory and the pods are getting evicted. Is there a way to set limit to how much memory envoy proxy can use in the envoy configuration file?

like image 950
GreatBear Avatar asked Dec 18 '25 05:12

GreatBear


1 Answers

You can probably do that by configuring the overload-manager in the bootstrap configuration for Envoy. Here's a documentation link for more details. It is done simply by adding overload-manager section as follows:

overload_manager:
  refresh_interval: 0.25s
  resource_monitors:
  - name: "envoy.resource_monitors.fixed_heap"
    typed_config:
      "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig
      # TODO: Tune for your system.
      max_heap_size_bytes: 2147483648  # 2 GiB <==== fix this!
  actions:
  - name: "envoy.overload_actions.shrink_heap"
    triggers:
    - name: "envoy.resource_monitors.fixed_heap"
      threshold:
        value: 0.95
  - name: "envoy.overload_actions.stop_accepting_requests"
    triggers:
    - name: "envoy.resource_monitors.fixed_heap"
      threshold:
        value: 0.98
like image 153
zer0 Avatar answered Dec 20 '25 00:12

zer0



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!