Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase client_max_body_size to 5 MB #475

Merged
merged 1 commit into from
Apr 13, 2022
Merged

Conversation

mpdude
Copy link
Contributor

@mpdude mpdude commented Apr 12, 2022

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.

@glensc
Copy link
Contributor

glensc commented Apr 12, 2022

Thus, I think avoiding background errors like 413 is important.

please explain what is that

@mpdude
Copy link
Contributor Author

mpdude commented Apr 13, 2022

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?

@glensc
Copy link
Contributor

glensc commented Apr 13, 2022

All is well explained except that magic number 413 was unclear.

@glensc glensc changed the base branch from 0.21.x to 0.20.x April 13, 2022 13:51
@glensc glensc added this to the 0.20.5 milestone Apr 13, 2022
@glensc glensc merged commit 1e16517 into perftools:0.20.x Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants