# Aggresive increase in kong memory usage

**URL:** <https://discuss.konghq.com/t/aggresive-increase-in-kong-memory-usage/4846>\
**Category:** Questions\
**Tags:** kubernetes\
**Created:** [November 7, 2019, 5:49pm UTC](https://discuss.konghq.com/t/aggresive-increase-in-kong-memory-usage/4846 "2019-11-07T17:49:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![samsja](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/samsja/32/1381_2.png) [@samsja](https://discuss.konghq.com/u/samsja)\
**Post date:** [November 7, 2019, 5:49pm UTC](https://discuss.konghq.com/t/aggresive-increase-in-kong-memory-usage/4846/1 "2019-11-07T17:49:25Z")

</div>

I am using kong since one month now in kubernetes cluster with ingress-controller.

I upgraded yesterday to last kong version (1.4) and the memory usage grow constantly even if the rps on APIs stay low ( less than 1rps).

memory/time

 ![Screenshot%20from%202019-11-07%2018-42-54](https://canada1.discourse-cdn.com/flex036/uploads/konghq/original/2X/e/e9f3fd5004d5e69abcbc8b4f7de764f3f54323b9.png)

rps/time

 ![Screenshot%20from%202019-11-07%2018-47-01](https://canada1.discourse-cdn.com/flex036/uploads/konghq/original/2X/f/f4b356146c4bab966bdaee5786dd0e7c5945477b.png)

Could it come from the last kong version ?

I deployed kong with helm and I don’t specify any limits nor requests, I want first to determine the average consumption of kong in my cluster.

I am using some plugins:

- rate limit
- white list
- prometheus
- basic-auth

---

<div class="post-metadata">

**Author:** ![jeremyjpj0916](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/jeremyjpj0916/32/1388_2.png) [@jeremyjpj0916](https://discuss.konghq.com/u/jeremyjpj0916)\
**Post date:** [November 8, 2019, 5:44pm UTC](https://discuss.konghq.com/t/aggresive-increase-in-kong-memory-usage/4846/2 "2019-11-08T17:44:54Z")

</div>

Seems related to: [Possible memory leak - Kong 1.4 & KIC 0.6.1](https://discuss.konghq.com/t/possible-memory-leak-kong-1-4-kic-0-6-1/4800/5)

---

<div class="post-metadata">

**Author:** ![Neeraj\_Shandilya](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/neeraj_shandilya/32/1483_2.png) [@Neeraj\_Shandilya](https://discuss.konghq.com/u/Neeraj_Shandilya)\
**Post date:** [November 12, 2019, 11:58am UTC](https://discuss.konghq.com/t/aggresive-increase-in-kong-memory-usage/4846/3 "2019-11-12T11:58:39Z")

</div>

I also had similar experience with kong latest version. We also had a similar setup we are running on kubernetes cluster with latest ingress-controller. Also we have following plugin enabled

- JWT
- ip-restriction

Image: Memory usage is increasing.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/konghq/original/2X/5/565c0b2c6b3f3657a60a9a11925d9cb312b66ad6.png)

---

<div class="post-metadata">

**Author:** ![samsja](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/samsja/32/1381_2.png) [@samsja](https://discuss.konghq.com/u/samsja)\
**Post date:** [November 12, 2019, 12:54pm UTC](https://discuss.konghq.com/t/aggresive-increase-in-kong-memory-usage/4846/4 "2019-11-12T12:54:42Z")

</div>

I downgraded kong to my previous version (1.3) and the memory usage come back to normal (average 100mo used ) . I presume that there is an memory leak in the 1.4 versions … I am waiting a fix before reupgrade

---

<div class="post-metadata">

**Author:** ![Neeraj\_Shandilya](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/neeraj_shandilya/32/1483_2.png) [@Neeraj\_Shandilya](https://discuss.konghq.com/u/Neeraj_Shandilya)\
**Post date:** [November 14, 2019, 2:04pm UTC](https://discuss.konghq.com/t/aggresive-increase-in-kong-memory-usage/4846/5 "2019-11-14T14:04:23Z")

</div>

Just wondering which ingress controller are you using with kong 1.3 ?

---

<div class="post-metadata">

**Author:** ![abenitovsc](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/abenitovsc/32/1521_2.png) [@abenitovsc](https://discuss.konghq.com/u/abenitovsc)\
**Post date:** [November 20, 2019, 12:07pm UTC](https://discuss.konghq.com/t/aggresive-increase-in-kong-memory-usage/4846/6 "2019-11-20T12:07:53Z")

</div>

Hi @samsja,  
Did you try to set memory limits? i had the same issue with 1.4 version and after setting them, it seems that Kong realizes about the container resources limits and it’s able to clean memory.  
Without that, the memory increased without control

---

<div class="post-metadata">

**Author:** ![samsja](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/samsja/32/1381_2.png) [@samsja](https://discuss.konghq.com/u/samsja)\
**Post date:** [November 20, 2019, 2:24pm UTC](https://discuss.konghq.com/t/aggresive-increase-in-kong-memory-usage/4846/7 "2019-11-20T14:24:04Z")

</div>

We are using Ingress Controller : 0.6.0

---

<div class="post-metadata">

**Author:** ![samsja](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/samsja/32/1381_2.png) [@samsja](https://discuss.konghq.com/u/samsja)\
**Post date:** [November 20, 2019, 2:26pm UTC](https://discuss.konghq.com/t/aggresive-increase-in-kong-memory-usage/4846/8 "2019-11-20T14:26:54Z")

</div>

I have’nt put any limits nor request yet because kong in still in test in our infra, but kong 1.3 work great without those control, they were no abnormal behaviour.

---

<div class="post-metadata">

**Author:** ![abenitovsc](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/abenitovsc/32/1521_2.png) [@abenitovsc](https://discuss.konghq.com/u/abenitovsc)\
**Post date:** [November 20, 2019, 2:55pm UTC](https://discuss.konghq.com/t/aggresive-increase-in-kong-memory-usage/4846/9 "2019-11-20T14:55:34Z")

</div>

I have also tried with Kong 1.3 and it’s true that memory consumption is more under control but we had lot of “no-memory” issues ([https://github.com/Kong/lua-resty-worker-events/issues/19](https://github.com/Kong/lua-resty-worker-events/issues/19)) and services got no available.
