Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for new config options #167

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 49 additions & 7 deletions source/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,25 @@ Available listener options:
defines SSL/TLS
:ref:`settings <configuration-listeners-ssl>`.

* - **backlog**
- Integer;
controls the 'backlog' parameter to the *listen(2)* system-call.
This essentially limits the number of pending connections waiting
Jcahilltorre marked this conversation as resolved.
Show resolved Hide resolved
to be accepted.

The default varies by system.

On Linux, FreeBSD, OpenBSD and macOS the default is **-1** which
means use the OS default. For example. on Linux since 5.4, this is
**4096** (previously **128**) and on FreeBSD it's **128**.

On other systems the default is **511**.

NOTE: Whatever limit you set here will be limited by the OS
system-wide sysctl. For example. on Linux that is
**net.core.somaxconn** and on BSD it's **kern.ipc.somaxconn**
Jcahilltorre marked this conversation as resolved.
Show resolved Hide resolved

*(since 1.33.0)*

Here, a local listener accepts requests at port 8300
and passes them to the **blogs** app
Expand Down Expand Up @@ -3293,14 +3312,15 @@ shared between all application languages:

* - **stderr**, **stdout**
- Strings;
filenames where Unit redirects
the application's output.
filenames where Unit redirects the application's output.

The default when running *with* **--no-daemon** is to send
*stdout* to the *console* and *stderr* to Unit's *log*.

The default is **/dev/null**.
The default when running *without* **--no-daemon** is to send
*stdout* to */dev/null* and *stderr* to Unit's *log*.

When running in **--no-daemon** mode, application output
is always redirected to
:ref:`Unit's log file <troubleshooting-log>`.
These options have *no* effect when running with **--no-daemon**.

* - **user**
- String;
Expand Down Expand Up @@ -4720,6 +4740,16 @@ you have:

The default is **application**.

* - **factory**
- Boolean:
when enabled, Unit treats **callable** as a factory.

The default is **false**.

**Note:** Unit does *not* support passing arguments to factories.

*(since 1.33.0)*

* - **home**
- String;
path to the app's
Expand Down Expand Up @@ -5357,6 +5387,16 @@ that stores instance-wide preferences.
* - Option
- Description

* - **listen_threads**
- Integer;
controls the number of router threads created to handle client
connections. Each thread includes all the configured listeners.

By default, we create as many threads as the number of CPUs that
are available to run on.

*(since 1.33.0)*

* - **http**
- Object;
fine-tunes handling of HTTP requests
Expand Down Expand Up @@ -5469,6 +5509,8 @@ In turn, the **http** option exposes the following settings:

The default is **true**.

*(since 1.30.0)*

* - **static**
- Object;
configures static asset handling.
Expand Down Expand Up @@ -5662,4 +5704,4 @@ Example with njs and the use of a template literal:
"if": "`${uri == '/health' ? false : true}`",
"path": "..."
}
}
}