# Vmagent killed by OOM killer

**URL:** <https://forums.percona.com/t/vmagent-killed-by-oom-killer/33365>\
**Category:** Percona Monitoring and Management (PMM)\
**Tags:** pmm\
**Created:** [September 26, 2024, 10:03am UTC](https://forums.percona.com/t/vmagent-killed-by-oom-killer/33365 "2024-09-26T10:03:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jakub\_Noga](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jakub_noga/32/12200_2.png) [@Jakub\_Noga](https://forums.percona.com/u/Jakub_Noga)\
**Post date:** [September 26, 2024, 10:03am UTC](https://forums.percona.com/t/vmagent-killed-by-oom-killer/33365/1 "2024-09-26T10:03:25Z")

</div>

## Description:

In the [topic](https://forums.percona.com/t/scrape-mysql-with-performance-schema-on/29251) we found out that OOM killer killing repeatedly vmagent. Is there some option to limit used memory by vmagent?

## Version:

pmm-client: Version: 2.41.1

---

<div class="post-metadata">

**Author:** ![Roma\_Novikov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/roma_novikov/32/1161_2.png) [@Roma\_Novikov](https://forums.percona.com/u/Roma_Novikov)\
**Post date:** [September 26, 2024, 10:22am UTC](https://forums.percona.com/t/vmagent-killed-by-oom-killer/33365/2 "2024-09-26T10:22:27Z")

</div>

@Jakub_Noga  
You can check [[PMM-9374] - Percona JIRA](https://perconadev.atlassian.net/browse/PMM-9374#icft=PMM-9374) for examples.  
TLDR: start the PMM server with -e VMAGENT\_memory\_allowedBytes flag, and all your agents should have it.

There are known bug, that not all parameters are working properly, you can see the list in  
[https://perconadev.atlassian.net/browse/PMM-11826](https://perconadev.atlassian.net/browse/PMM-11826)

---

<div class="post-metadata">

**Author:** ![Jakub\_Noga](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jakub_noga/32/12200_2.png) [@Jakub\_Noga](https://forums.percona.com/u/Jakub_Noga)\
**Post date:** [October 1, 2024, 10:01am UTC](https://forums.percona.com/t/vmagent-killed-by-oom-killer/33365/3 "2024-10-01T10:01:34Z")

</div>

@Roma_Novikov

Thank you for your reply. Unfortunately setting ENV on the server side didn’t affect the client.

The container has a limit of 5GB and vmagent is still working over the defined `VMAGENT_memory_allowedBytes` that is `3GB` at the moment. Info from dmesg:

```auto
Killed process 296139 (vmagent) total-vm:5999408kB, anon-rss:4397708kB, file-rss:8844kB, shmem-rss:0kB, UID:1002 pgtables:9372kB oom_score_adj:0

```

Is the option already implemented in our version (now `2.41.2`)

---

<div class="post-metadata">

**Author:** ![Jakub\_Noga](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jakub_noga/32/12200_2.png) [@Jakub\_Noga](https://forums.percona.com/u/Jakub_Noga)\
**Post date:** [October 14, 2024, 9:34am UTC](https://forums.percona.com/t/vmagent-killed-by-oom-killer/33365/4 "2024-10-14T09:34:32Z")

</div>

@Roma_Novikov Any update?
