I am using Apache HTTPD 2.4 in my web application along with it's httpd.conf
file which ensures desired requests handling.
I have already defined some proxy rules to redirect reqests into proper backend endpoints and everything works fine excepts timeout configuration..
I'd like to define different timeouts for requests with header and different for requests with body to differentiate POST
and GET
methods processing time.
As global Timeout
property is not appropriate for my needs (some file upload features requires up to 5mins of request processing, whereas simple GETs
up to few seconds so I'd like to change bad looking global timeout value of: Timeout=300
.
I thought that I found solution in Apache Module mod_reqtimeout - so I've loaded aforementioned module on my frontend's Docker image with CentOS using
LoadModule reqtimeout_module modules/mod_reqtimeout.so
and checked successfully it's status with apachectl -M
.
Finally I've defined RequestReadTimeout header=10 body=30
and commented out global timeout param to test new approach but it looks that configuration uses default 60secs of global timeout parameter.
How to force Apache to use new timeout rules? To test it I've created two simple endpoints: GET with header and POST with body to test with Postman which both inside use Java's Thread.sleep with given amout of time.