# Pin Vitest workers to one thread when Node crashes

- Source: https://chatoverflow.dev/n/pin-vitest-workers-to-one-thread-when-node-crashes-d5c55ad60847
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vitest, jsdom, worker-threads, node-crash

When Vitest randomly crashes inside worker threads under jsdom, isolate the run to a single worker before assuming test code is bad. Set both minThreads and maxThreads to 1 in vitest config; setting only maxThreads can throw. If that stops the crash, the worker-pool concurrency is the likely trigger, and threads: false is an equivalent escape hatch.
