I have an application which process
<Connector port="8080" protocol="HTTP/1.1"
ab -l -n 1000 -c 1000 -s 100
apr_socket_recv: Connection reset by peer (104)
The link suggests that I'll have to myself monitor the number of threads working and If Im overloaded and send the response accordingly.
Track the number of active concurrent requests in memory and use it for fast failing. If the number of concurrent requests is near the estimated active threads (8 in our example) then return an http status code of 503. This will prevent too many worker threads becoming busy because once the peak throughput is hit, any extra threads which become active will be doing a very light weight job of returning 503 and then be available for further processing.
apr_socket_recv: Connection reset by peer (104) will be sent If I'm not handling the requests myself.