I need to make a very large GET request with NGINX and PHP. Is there any configuration in NGINX or PHP that solves this?
I need to make a very large GET request with NGINX and PHP. Is there any configuration in NGINX or PHP that solves this?
Change the large_client_header_buffers
directive.
The request line can not be bigger than the size of one buffer, if the client sends a larger header nginx returns error "Request URI too large" (414).
The longest header line of request also needs to be buffered, otherwise the client will get the "Bad request" (400) error.
Buffers are separated only as needed.
By default the size of one buffer is 8192 bytes. In the old nginx, this is equal to the size of the page, depending on the platform, either 4K or 8K, if at the end of the working request, it converts to state keep-alive, then these buffers are freed.
Translating:
This directive assigns a maximum number and size of buffers to long headers read from the client request.
The request line can not be larger than the buffer size, and if the client sends a header nginx will return an "Request URI too large" error (414).
The largest row of the header can also not be larger than the size of a buffer, otherwise the client will receive an "Bad request" (400) error.
Buffers are only separated if necessary.
By default, the size of a buffer is 8192 bytes. In old nginx, this is equivalent to page size - depending on the platform, it is 4K or 8K; if at the end of the current request the connection acquires the keep-alive state, then these buffers are freed.
Reference: link
The maximum size of the GET is usually limited on both the server and the client, and this limit is usually 8KB. If the client is going through a proxy, there is probably a limit there as well. That is, if you need GET requests greater than this, you will have to check the settings for all of them.