They queue up, albeit will eventually fail.
New connections are accepted on a socket which has had listen() call done on it:
http://www.opengroup.org/onlinepubs/009695399/functions/listen.html
The queue back log is set by mod_wsgi to be:
if (listen(sockfd, WSGI_LISTEN_BACKLOG) < 0) {
ap_log_error(APLOG_MARK, WSGI_LOG_ALERT(errno), wsgi_server,
"mod_wsgi (pid=%d): Couldn't listen on unix domain "
"socket.", getpid());
return -1;
}
Where:
#ifndef WSGI_LISTEN_BACKLOG
#define WSGI_LISTEN_BACKLOG 100
#endif
Thus up to 100 internal connection requests can queue up.
If that limit is exceeded, then it will at that point fail and a retry
mechanism within mod_wsgi will kick in:
if (connect(daemon->fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
if (errno == ECONNREFUSED && retries < WSGI_CONNECT_ATTEMPTS) {
ap_log_rerror(APLOG_MARK, WSGI_LOG_ERR(errno), r,
"mod_wsgi (pid=%d): Connection attempt #%d to "
"WSGI daemon process '%s' on '%s' failed, "
"sleeping before retrying again.", getpid(),
retries, daemon->name, daemon->socket);
close(daemon->fd);
You will start to see those connect attempt failure messages.
If that goes on for a time, you will then have:
ap_log_rerror(APLOG_MARK, WSGI_LOG_ERR(errno), r,
"mod_wsgi (pid=%d): Unable to connect to "
"WSGI daemon process '%s' on '%s' after "
"multiple attempts.", getpid(), daemon->name,
daemon->socket);
close(daemon->fd);
return HTTP_SERVICE_UNAVAILABLE;
At that point, HTTP client will send a 503 error message indicating
service unavailable.
So, it will not die straight away.
Graham
If you are that paranoid about static resources not being able to be
handled, put a nginx server in front of Apache for handling static
media and have nginx proxy only dynamic web application requests
through to Apache/mod_wsgi.
In other words, don't try and make one tool do everything as static
file handling and dynamic web applications generally have different
requirements. Apache is not the best at static file serving and you
are much better off using nginx for that.
Graham