Blog

Posts tagged “undici”

UV_THREADPOOL_SIZE in Node.js: terminal output where dns.lookup(localhost) takes 544 ms behind eight scrypt hashes with the default pool and 30 ms with UV_THREADPOOL_SIZE=16, measured on Node 22.23
Monitoring

UV_THREADPOOL_SIZE in Node.js: when DNS lookups, crypto and fs wait in the same line

Outbound calls slow down under load while CPU stays low? DNS lookups, crypto and fs share libuv's 4-thread pool in Node. How to reproduce the queue, measure it per upstream, and set UV_THREADPOOL_SIZE.

Jason Fill October 22, 2026 5 min read
ECONNRESET, ETIMEDOUT, ECONNREFUSED: headline 'Three error codes, three different parties that hung up' with each code, its syscall and meaning, and the note that a stale keep-alive socket is the usual ECONNRESET cause in an API.
Debugging

ECONNRESET, ETIMEDOUT, ECONNREFUSED: what each means in your Node logs

ECONNREFUSED, ETIMEDOUT and ECONNRESET look alike in a log and have different causes. What each one means, how to tell inbound from outbound, and the fixes: keep-alive timeouts, explicit timeouts, and retries only on idempotent calls.

Jason Fill September 28, 2026 4 min read
Third-party API latency, measured. Cover graphic for a guide to measuring per-vendor latency, errors and throttling from Node.
Monitoring

Third-party API latency: measuring vendor slowness and failures in Node

The vendor status page is green and your checkout is slow. Here is how to measure third-party API latency and failures from your own Node servers, per dependency, without wrapping fetch.

Jason Fill September 17, 2026 6 min read
SSRF in Node.js, blocked at connect. Cover graphic for a guide to preventing server-side request forgery in Node.js fetch and undici calls.
Security

SSRF in Node.js: the fetch() you didn't mean to make

A customer pastes a webhook URL pointing at your cloud metadata endpoint, and your API fetches it. Learn how SSRF in Node.js happens, why blocklists on URL strings fail, and a tested safeFetch() you can ship today.

Jason Fill September 8, 2026 6 min read
Log outbound HTTP requests per host. Cover graphic for a guide to logging fetch and axios calls in Node.js with diagnostics_channel.
Logging

How to log outbound HTTP requests in Node.js

Your API threw 502s because a provider was timing out, and your logs said nothing. Log outbound HTTP requests from fetch and axios with diagnostics_channel in an afternoon, then read error rate and p95 per host.

Jason Fill February 18, 2026 6 min read
Node.js fetch timeout, set properly. Cover graphic for a guide to setting Node.js fetch timeouts with AbortSignal and undici.
Coding

Node.js fetch timeout: deadlines with AbortSignal and undici

One slow vendor and every handler hangs, because Node fetch waits up to five minutes by default. Here is how to set deadlines with AbortSignal and undici in Express and Fastify.

Jason Fill February 9, 2026 6 min read