# throttle dont dispose users along the time which cause issues with memory along the time

**URL:** <https://community.gatling.io/t/throttle-dont-dispose-users-along-the-time-which-cause-issues-with-memory-along-the-time/6021>\
**Category:** Gatling (Open-Source)\
**Created:** [March 17, 2021, 3:35pm UTC](https://community.gatling.io/t/throttle-dont-dispose-users-along-the-time-which-cause-issues-with-memory-along-the-time/6021 "2021-03-17T15:35:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcin\_Stanek](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@Marcin\_Stanek](https://community.gatling.io/u/Marcin_Stanek)\
**Post date:** [March 17, 2021, 3:35pm UTC](https://community.gatling.io/t/throttle-dont-dispose-users-along-the-time-which-cause-issues-with-memory-along-the-time/6021/1 "2021-03-17T15:35:15Z")

</div>

Hello,

I am using gatling to put some static load on ur backend. Here is my snippet:

_setUp(_  
_scn.inject(_  
_constantUsersPerSec(rps + 2) during duration,_  
_).throttle(_  
_warmUp ::: List(_  
_jumpToRps(rps),_  
_holdFor(duration))_  
_).protocols(httpProtocol)_  
_).maxDuration(duration)_

The issue is related to throttle. It is working well in functional way i have constant rps but problem is with long tests, after arround 2 hours, despite the load. After this time i am start to recieve exceptions like java.lang.OutOfMemoryError. I think it is related with numbers of users, it is grows along the time which in my opinion cause issues with memory. Any idea how to dispose users? What I am doing wrong? i am attached image which shows signifacnt grow of active usrers.

Regards  
Marcin

 ![Screenshot 2021-03-17 at 16.29.39.png](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/1X/577abfdcae238857f49b9e634ff488a4e4543740.png)
