Core directives

thread_pool (Core directives)

Defines a named pool for supported file I/O tasks; main context. Requires appropriate build support.

Formal Syntax & Structure

nginx syntaxnginx
thread_pool name threads=number [max_queue=number];

Parameters & Attributes

NameTypeDescription
nameidentifierIdentify the pool used by threaded file I/O.
threadsthreads=positive integerSpecify the pool worker thread count.
max_queuemax_queue=nonnegative integerBound pending tasks; default 65536. Overflow fails the task.

Working Example

Example Snippetnginx
thread_pool files threads=2 max_queue=64;
Nginx Reference