# Max request payload size

**URL:** <https://community.gatling.io/t/max-request-payload-size/5611>\
**Category:** Gatling (Open-Source)\
**Created:** [May 8, 2020, 7:34am UTC](https://community.gatling.io/t/max-request-payload-size/5611 "2020-05-08T07:34:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yashvi\_Goyal](https://avatars.discourse-cdn.com/v4/letter/y/779978/32.png) [@Yashvi\_Goyal](https://community.gatling.io/u/Yashvi_Goyal)\
**Post date:** [May 8, 2020, 7:34am UTC](https://community.gatling.io/t/max-request-payload-size/5611/1 "2020-05-08T07:34:26Z")

</div>

Hey all,  
I want to know if there is a limit on the max payload that we can send in a post request in the request StringBody and if there is a specific writing speed associated with it.  
I want to test an API which has a default timeout of say 30 secs. I am able to test it with a small payload size , but as soon as it increases invariably , I receive a premature close error.  
I think its because the complete payload is not being written in that duration or I might be missing something. So,any ideas?  
And also are there any variables where we can set the request payload max size or the writing speed?  
(Gatling Version used is 3.1.3)

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [May 8, 2020, 8:23am UTC](https://community.gatling.io/t/max-request-payload-size/5611/2 "2020-05-08T08:23:42Z")

</div>

No, there’s no such limit.  
Your uploads could be timing out because:

- your SUT can’t process in time
- your load injector machine is not beefy enough (CPU, bandwidth)  
Note: you should upgrade to latest Gatling 3.3.1.

---

<div class="post-metadata">

**Author:** ![Yashvi\_Goyal](https://avatars.discourse-cdn.com/v4/letter/y/779978/32.png) [@Yashvi\_Goyal](https://community.gatling.io/u/Yashvi_Goyal)\
**Post date:** [May 8, 2020, 9:57am UTC](https://community.gatling.io/t/max-request-payload-size/5611/3 "2020-05-08T09:57:51Z")

</div>

Thanks for such a quick response. I think I should check the CPU and bandwidth as you mentioned.

---

<div class="post-metadata">

**Author:** ![lil\_bud](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/lil_bud/32/1473_2.png) [@lil\_bud](https://community.gatling.io/u/lil_bud)\
**Post date:** [March 19, 2024, 2:12pm UTC](https://community.gatling.io/t/max-request-payload-size/5611/4 "2024-03-19T14:12:31Z")

</div>

Hi @Yashvi I’m facing something similar, were you able to fix this?

---

<div class="post-metadata">

**Author:** ![GeMi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/gemi/32/939_2.png) [@GeMi](https://community.gatling.io/u/GeMi)\
**Post date:** [March 20, 2024, 8:53pm UTC](https://community.gatling.io/t/max-request-payload-size/5611/5 "2024-03-20T20:53:51Z")

</div>

How big payload you have?

---

<div class="post-metadata">

**Author:** ![Yashvi](https://avatars.discourse-cdn.com/v4/letter/y/838e76/32.png) [@Yashvi](https://community.gatling.io/u/Yashvi)\
**Post date:** [March 21, 2024, 5:31am UTC](https://community.gatling.io/t/max-request-payload-size/5611/6 "2024-03-21T05:31:22Z")

</div>

Hi,  
I remember that I had increased the memory configurations for my tool and Gatling. It got fixed after that.  
Hope it helps.  
Also you need to be careful if you are accessing other network/server, make sure to have a proper connection; test it with small data packets t make sure if it is data issue or a network issue you are facing
