-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Large 'include' argument can cause '502 Bad Gateway' server error #11541
Comments
Apache and nginx would usually respond with a https://core.trac.wordpress.org/ticket/22757 also comes into play, where certain setups (suhosin) can limit individual query string lengths, core uses 128char as a safe value, as 512 characters is the default |
Looking at the included image, I'm thinking this is indeed a security extension limitation (or imitation of it) as the If you were to take the core direction and limit it at 128char, with the above scenario you'd only be able to request |
Hey Daniel @danielbachhuber and Dion @dd32 |
Any news on this? |
This issue is still relevant. PHP and server settings don't seem to be the problem, as I have the following configuration: max_input_vars=4000, memory_limit=256M, post_max_size=1000M. |
To test #11524, I assigned 201 tags to my post with:
wp term generate post_tag --count=200 wp term list post_tag --field=id | xargs -I % wp post term add 75 post_tag % --by=id
When I loaded the post in Gutenberg, I saw this
502 Bad Gateway
error:My educated hypothesis is that the error originates from the large
include
set;include
gets translated to a very long query string which the server can't handle.One idea is to introduce some middleware that gracefully batches a request with large
include
into multiple requests. However, this middleware would need to be sensitive to theorder
andorderby
values too.The text was updated successfully, but these errors were encountered: