Skip to content

UV_THREADPOOL_SIZE undefined in Windows #1429

Closed
@rhernandog

Description

@rhernandog
  • Node.js Version: 8.11.2
  • OS: Windows 7 64
  • Scope (install, code, runtime, meta, other?): startup
  • Module (and version) (if relevant): none

Hi,

I'm not completely sure if this should be here or on the libuv repo, so correct me if I'm in the wrong place asking the wrong question.

I was running some benchmarks with apache benchmark on an express server and I tried to modify the number of threads in the thread pool through my index.js file with no success:
process.env.UV_THREADPOOL_SIZE=1;

I ran it through the command line and it worked, then I wanted to check the amount of threads by doing a console.log(process.env.UV_THREADPOOL_SIZE) call. The thing is that I forgot to remove that line of code and when I restarted my laptop I got undefined from the console call.

So in fact when you start a fresh boot of the machine the UV_THREADPOOL_SIZE property is not set in the process.env object. Why is that?, Why the property is not added with it's default size (4 as I understand from the libuv docs) at startup?.

On Start Up

console.log(process.env.UV_THREADPOOL_SIZE); // -> undefined

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions