What response code Apache throws when it max out? - apache

I use Apache 2.4 as web server. When it exceeds max connections limit, what response code the client receives from the web server?

Apache throws 504 status code response to client.
504 GATEWAY TIMEOUT
The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request.

Related

How should I configure the health check for an https backend of an oci load balancer

I have an oci load balancer setup to front-end my webservers. I have the http backendSet configured using the http protocol and port 80 to handle the healthcheck by checking for a status code of 200.
However i also need a backendSet for handling https traffic. The choices for protocol for the health check only include http and tcp, but my understanding is that using a tcp health check only verifies that the server is up not that the webserver is working properly. If I use the http protocol with port 443, I get inconsistent status codes back from the webserver.When the webserver tries to perform the ssl handshake I get a 400 bad request status back, and other times I get a 403 unauthorized or 200 ok status code.
If I look at the apache access_log file on the backend webserver I see these various status codes, so I am not certain the best way to configure the health check so I can get anything other than a critical health check.
Any suggestions would be appreciated.

getting lots of 408 status code in apache access log after migration from http to https

We are getting lots of 408 status code in apache access log and these are coming after migration from http to https .
Our web server is behind loadbalancer and we are using keepalive on and keepalivetimeout value is 15 sec.
Can someone please help to resolve this.
Same problem here, after migration from http to https. Do not panic, it is not a bug but a client feature ;)
I suppose that you find these log entries only in the logs of the default (or alphabetically first) apache ssl conf and that you have a low timeout (<20).
As of my tests these are clients establishing pre-connected/speculative sockets to your web server for fast next page/resource load.
Since they only establish the initial socket connection or handshake ( 150 bytes or few thousands) the connect to the ip and do not specify a vhost name, and got logged in the default/firs apache conf log.
After few secs from the initial connection they drop the socket if not needed or the use is for faster further request.
If your timeout is lower than these few secs you get the 408 if is higher apache doesn't bother.
So either you ignore them / add a different default conf for apache, or you rise the timeout having more apache processes busy waiting from the client to drop or use the socket.
see https://bugs.chromium.org/p/chromium/issues/detail?id=85229 for some related discussions

What is 502 Proxy error? How to Resolve it

When i try to login into Artifactory web appliaction ,its showing proxy error. The Error message is below.
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request POST /artifactory/webapp/login.html.
Reason: Error reading from remote server
Apache/2.2.15 (CentOS) Server at XX.XX.XX.XX Port 80
Any Solution for this?

(103) Software caused connection abort: proxy: pass request body failed

The following errors are being logged in our proxy Apache logs while processing the request with Tomcat Server:
(103)Software caused connection abort: proxy: pass request body failed
proxy: pass request body failed
We've a Apache reverse proxy which serves the request for the client from our Tomcat Server. Sometimes, the request from the proxy returns 502 with the above error. There are no error logs in Tomcat Server Logs correlated with the above errors in Proxy. Also, the request didn't timeout since some of the requests response time is 1 sec and our default timeout is 120 sec.
We've added ProxyBadHeader Ignore to our httpd configuration [Ref: 502 Proxy Error / Uploading from Apache (mod_proxy) to Tomcat 7] and still didn't see any errors in our Tomcat logs.
Have anyone seen this issue earlier?
We recently had this issue after upgrading one of our machines from Tomcat 6 to 7. Someone forgot to change the default apache-tomcat/conf/tomcat-users.xml file from our standard one and so the wrong password was getting checked by the server. Interestingly this results in the 502 Error you saw above. This can be avoided with some decent logging to determine it is actually an auth problem.

Apache: How can I log the total bytes transferred through a HTTP tunnel

I have Apache configured as a proxy. Clients are establishing an HTTP tunnel using the CONNECT method to my Apache proxy. I'd like to log the amount of data transferred through the HTTP tunnel. I've tried using mod_logio's %O and %I methods but those only log the initial request and response sizes of the CONNECT request, not the subsequently tunnelled data.