vercel/next.js · error
Port ${originalPort} is in use by process ${pid}, using avai
Error message
Port ${originalPort} is in use by process ${pid}, using available port ${port} instead. What it means
Warning from startServer's listening handler when port retrying was enabled (portRetryCount > 0): the requested originalPort is already bound, so the server fell back to the next available port. It resolves the holding process id via getProcessIdUsingPort and reports which pid holds the original port and which port is actually being used instead.
Source
Thrown at packages/next/src/server/lib/start-server.ts:339
const addr = server.address()
const actualHostname = formatHostname(
typeof addr === 'object'
? addr?.address || hostname || 'localhost'
: addr
)
const formattedHostname =
!hostname || actualHostname === '0.0.0.0'
? 'localhost'
: actualHostname === '[::]'
? '[::1]'
: formatHostname(hostname)
port = typeof addr === 'object' ? addr?.port || port : port
if (portRetryCount) {
const pid = await getProcessIdUsingPort(originalPort)
if (pid) {
Log.warn(
`Port ${originalPort} is in use by process ${pid}, using available port ${port} instead.`
)
} else {
Log.warn(
`Port ${originalPort} is in use by an unknown process, using available port ${port} instead.`
)
}
}
const networkHostname =
hostname ?? getNetworkHost(isIPv6(actualHostname) ? 'IPv6' : 'IPv4')
const protocol = selfSignedCertificate ? 'https' : 'http'
const networkUrl = networkHostname
? `${protocol}://${formatHostname(networkHostname)}:${port}`
: null
View on GitHub (pinned to 89d017eac4)
Solutions
- Stop the process using the port, or accept the automatically selected port.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at packages/next/src/server/lib/start-server.ts:339 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vercel/next.js@89d017eac4 (2026-08-19).
Data as JSON: /api/errors/1f26dc19d856d67e.
Report an issue: GitHub.