Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Many sites recommend using 'deferred' with the listen directive for nginx. Is this necessary on the Ubuntu installation or is "listen 80" sufficient with 'deferred' on by default?

listen 80 default deferred; # for Linux
share|improve this question
I would check the nginx wiki: – Thomas Ward Jul 19 '11 at 20:12
The nginx wiki doesn't say what the default is. – Adam Nelson Jul 25 '11 at 15:21
up vote 5 down vote accepted

deferred is not enabled by default on Ubuntu, there is no patch that enables it by default.

Below is my attempt to get an understanding of what the option does.

From the reference at

deferred -- indicates to use that postponed accept(2) on Linux with the aid of option TCP_DEFER_ACCEPT

Right, it refers to the manual page accept, section 2 - System calls (functions provided by the kernel). Unfortunately I couldn't find any information in that manual page about the effect of it, so I started digging in the source code (apt-get source nginx).

The option is enabled in nginx-0.8.54/src/http/ngx_http_core_module.c:3534. If deffered accept is not supported, you should get an error message on startup:

the deferred accept is not supported on this platform, ignored

At this point I stopped searching further. It wouldn't make sense if deferred is enabled by default in nginx if it cannot be disabled.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.