Hi all, I am currently trying to understand the different timout parameters a bit better and how they interact. We are using apache httpd 2.4 mod_proxy on a centos system as a reverse proxy with mod_proxy_balancer.
Here is the relevant section from our setup: Define CONNECTION_OPTIONS "min=10 max=500 smax=30 acquire=5000 connectiontimeout=5 disablereuse=off keepalive=off timeout=29 ttl=10 retry=60" <Proxy balancer://balancer location/> BalancerMember https://Server1/ ${CONNECTION_OPTIONS} BalancerMember https:// Server2/ ${CONNECTION_OPTIONS} status=+H ProxySet lbmethod=bytraffic </Proxy> What I am trying to understand is how the different timeout parameters interact and at what time a request might have been sent to the backend. Can you confirm/correct the following understanding and answer the questions? Acquire: Acquire timeout is a timeout send to the client if the connection pool is very busy and apache did not even start to process the request. If this timeout happens the request did not reach the proxy and I can be sure no
request is sent to the backend. In this case, the client will receive an http 503. Should I see these kind of requests within the access log of the proxy virtual host? Connectiontimeout: Connectiontimeout is a timeout that happens during handshake between the apache proxy and the backend. As we are using SSL between the proxy and the backend this can happen during SSL Handshake. If this timeout occurs
the request was trying to be processed by the proxy and will appear in the access log with an http code of 504. If this timeout occurs, then I can be sure that the request has not been sent to the backend. Can any other http code occur from time timeout and
is there even a small chance that we might have send the request to the backend?
ProxyTimeout and timeout: Timeout and proxy timeout will both occur only if a successful connection to the backend was established and if the request has been sent to the backend. Hence I should the see request in both logfiles. If the server
does not respond within the time defined in this timeout I would expect an http 502 to be created. Is this correct? The Part I would like to understand is: does the timeout include the acquire time and connection time or is it independent?
Let’s take an example: If it takes 4 seconds to acquire a connection and another 4 seconds to connect to the backend will the will the client see a timout after 29 seconds (timeout includes acquire and connection) will
the client see a timeout after 33 seconds (timout does nto include acquire time but toes include connection time) or will the client see a timeout after 37 seconds (timeout will only start to after the request was send). Is there any reason to set the proxytimeout to another value than the timeout? One related question: We are currently logging the http codes using ”%>s” from my understanding this is the http code we are sending in the response to the client. Is this correct and is there a way to also log the http
code we have received from the backend we are proxying to? I would expect the http code from the backend to be empty if a timeout occurs in our systems Thanks in advance Chris |