# POST request size limit

**URL:** <https://discourse.julialang.org/t/post-request-size-limit/98178>\
**Category:** Web Stack\
**Tags:** httpjl, oxygenjl\
**Created:** [May 1, 2023, 8:58pm UTC](https://discourse.julialang.org/t/post-request-size-limit/98178 "2023-05-01T20:58:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sschmidhuber](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sschmidhuber/32/13349_2.png) [@sschmidhuber](https://discourse.julialang.org/u/sschmidhuber)\
**Post date:** [May 1, 2023, 8:58pm UTC](https://discourse.julialang.org/t/post-request-size-limit/98178/1 "2023-05-01T20:58:26Z")

</div>

Hello,  
I’m building a web application using Oxygen (which is using HTTP.jl). Is there a way to limit the max request size for HTTP post requests?

When I’m able to check the size in the request handler, the memory is already allocated. So that is already to late. A potential attacker or careless user would just send a request with two times the size of server memory and the server will go down resp. the process be killed by the kernel.

What is the solution for this issue? I would like to set a max request size, dependent on server memory, in HTTP.jl or Oxygen, is that possible?

Thank you!

BR Stefan

---

<div class="post-metadata">

**Author:** ![sschmidhuber](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sschmidhuber/32/13349_2.png) [@sschmidhuber](https://discourse.julialang.org/u/sschmidhuber)\
**Post date:** [May 29, 2023, 12:37pm UTC](https://discourse.julialang.org/t/post-request-size-limit/98178/2 "2023-05-29T12:37:48Z")

</div>

In case someone finds this in future the potential solution is posted here: [Reject requests in HTTP.jl server based on memory usage - #5 by quinnj](https://discourse.julialang.org/t/reject-requests-in-http-jl-server-based-on-memory-usage/99216/5)

or use a reverse proxy, like nginx.
