thread_pool in Windows

Maxim Dounin mdounin at mdounin.ru
Sun Mar 4 15:48:43 UTC 2018


Hello!

On Sat, Mar 03, 2018 at 10:27:21PM -0500, Sergey Sandler wrote:

> I am running Nginx as a proxy for a single-threaded server (Shiny R) in
> Windows;both the proxy and the server are located on the same machine. There
> are delays due to timeout errors:
>     "upstream timed out: A connection attempt failed because the connected
> party did not properly respond after a period of time, request: "GET
> /shared/jquery.min.js HTTP/1.1""
> (and similar for other js and css files).
> 
> This can probably be solved with 'location alias'. But this is tedious,
> since the required files are spread out in R/Lib subdirectories.
> 
> The proper fix seems to be by restricting thread_pool with
>    thread_pool io_pool threads=1;
> and a corresponding directive under 'location'
>    aio threads=io_pool;
> However, Nginx reports: unknown directive "thread_pool". 

The error message indicate that your upstream server can't cope 
with load.  Using thread pools in nginx won't help you with this, 
you need to either tune your upstream server to handle more load, 
or move some load away from it, e.g., by serving static files 
directly by nginx.

> Is there a way to have 'thread_pool' supported in Windows?

Thread pools support for Windows is not implemented.  If you need 
them supported, you have to code relevant code bits first.  But, 
as explained above, this won't help with your particular problem.

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx mailing list