Closed mpdude closed 2 years ago
Thus, I think avoiding background errors like 413 is important.
please explain what is that
Sorry, that was really badly explained.
Specifically, I was referring to the Docker image and the docker-compose.yml
configuration provided in this repo. When the data submitted to XHGui (the body of the POST request) exceeds 1 MB in size, Ngnix will reject the request with an 413 – Request Entity Too Large
error message. Raising this 1 MB limit is what this PR is about.
What I meant with "in the background" is that in your code, you'll usually add some lines of code using perftools/php-profiler
to collect data and send it to XHGui. You don't really see or deal with this HTTP request submitting the data, and you also don't see the error message unless you search for it. As a user of XHGui, I see some of my requests showing up in the database, others not.
My suggestion is to avoid this kind of pitfall for unexperienced XHGui users (like I am).
Does that make more sense @glensc?
All is well explained except that magic number 413
was unclear.
The default
client_max_body_size
is 1MB and may be too low for more complex data submissions. IMHO, increasing it to 5M should not do too much harm resource-wise.Since the PHP Profiler silently discards errors when uploading data (here), it is not obvious for newcomers to understand why data does not show up. Thus, I think avoiding background errors like 413 is important.