Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache webserver - What happens to requests, when all worker threads are busy

As far as I researched, the scenario when all worker threads are busy serving requests, what happens to the requests that comes next.

  1. Do they wait?
  2. Is this related to some configurable parameters?
  3. Can I get the count of such requests ?

Adding to this please can you explain or give a link where I can get a clear picture of request processing strategy of Apache webserver?

Thanks for Looking at!!

like image 313
art9786 Avatar asked May 11 '11 11:05

art9786


People also ask

How many requests can Apache handle per minute?

By default, Apache Request limit is 160 requests per second, that is, Apache can handle up to 160 requests per second, without any modification.

How does Apache handle request?

The Apache server works by handling URL requests to the server through specific communication protocols in a multithreading fashion, and extending itself to work with programming and database languages.


2 Answers

This answer is given in 2015. So I talk about apache httpd 2.4.

  1. They wait because the connection is queued on the TCP socket (the connection is not ACKed) Although the default length of the backlog may be set way too high on linux boxes. This may result in connections being closed due to kernel limits being in place.
  2. ListenBacklog (with caveats. See 1.)
  3. This is described here. With lots of interesting stuff.

Read through Apache TCP Backlog by Ryan Frantz to get the glory details about the Apache backlog.

like image 154
itsafire Avatar answered Nov 03 '22 09:11

itsafire


When all Apache worker threads are busy, the new request is stalled (it waits) until one of those worker threads is available. If the client gives up waiting, or you surpass the maximum wait time in your configuration file; it will drop the connection.

like image 22
cbroughton Avatar answered Nov 03 '22 09:11

cbroughton