Ajax request does not reach the server when the body is too large

Asked

Viewed 54 times

0

In an ajax call I make to the server in a report generation function I am finding a situation.

When in the request body I send a small array, with 20 positions everything happens normally, but when I send a heavier request, with about 7400 positions in the array the request does not even reach the server.

I’m using the library Xios and I’m doing the front-end in Vuejs

My question is:

When a heavy request is made, Chrome or any other browser blocks or the library blocks??

  • Are you getting any message like Error: Request body larger than maxBodyLength limit?

  • which back-end language is using?

  • @Dobrychtop, no, I’m not having any error, just returns to Response as Undefined after some time, however I have a console.log function on the server and when the request is small, the function is executed, when it is larger it does not execute...

  • @Juliohenrique I’m using Nodejs with Hapijs

  • Can you tell me which server you’re using for the web? That sounds like configuration to me

  • What do you mean web server?? You refer to Nginx or Apache??

  • exactly, is using Apache?

  • This situation is occurring locally on my machine, not using Apache or Nginx, in development environment Vuejs does not need a server serving it,and in production the server is Node, is not used neither Apache nor any other

  • expensive when Voce uses AJAX it makes an http request to some server.. There is usually a data limit set to not crash the server. in your question you say "server" whatever you are using is in it that you should configure

  • Got it, I’ll take a closer look at the server settings, thank you very much for your help

  • @Leonardoebert the standard limit for the maxBodyLength from Xios is 10 MB, but if that was the problem you should be getting the error message I wrote above.

  • Yeah, that’s the weirdest thing, no mistake comes back...

Show 7 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.