Fix incorrect 'Ready in' time for next start#88589
Merged
timneutkens merged 1 commit intocanaryfrom Jan 16, 2026
Merged
Conversation
Collaborator
Stats from current PR✅ No significant changes detected📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles: **430 kB** → **430 kB** ✅ -86 B82 files with content-based hashes (individual files not comparable between builds) Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
|
Comment on lines
+374
to
376
| const startServerProcessDurationMs = startTime ? endTime - startTime : 0 | ||
|
|
||
| const formattedStartDuration = durationToString( |
Contributor
There was a problem hiding this comment.
maybe leverage process.uptime()*1000 here? Ready in 0ms` would be pretty confusing i think
lukesandberg
approved these changes
Jan 15, 2026
wyattjoh
pushed a commit
that referenced
this pull request
Jan 16, 2026
## What Fix the incorrect "Ready in" time displayed when running `next start`. The bug caused the time to show impossibly large values like "Ready in 29474457.7min" instead of the actual startup duration. ## Why The `NEXT_PRIVATE_START_TIME` environment variable was not being properly set/propagated when `startServer()` read it. When the variable was missing, the code defaulted to `0`, causing the calculation `Date.now() - 0` to equal the entire Unix timestamp (~1.77 trillion milliseconds ≈ 29 million minutes). ## How 1. Added a fallback in `cli/next-start.ts` to set `NEXT_PRIVATE_START_TIME` if it's not already set by `bin/next.ts` 2. Updated the calculation in `start-server.ts` to use `0` as the duration if `startTime` is falsy, preventing the bug 3. Removed unused performance mark code that was leftover ## Test Plan Run `next start` on a production build and verify the "Ready in" time shows a reasonable value (e.g., "Ready in 523ms" instead of millions of minutes).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Fix the incorrect "Ready in" time displayed when running
next start. The bug caused the time to show impossibly large values like "Ready in 29474457.7min" instead of the actual startup duration.Why
The
NEXT_PRIVATE_START_TIMEenvironment variable was not being properly set/propagated whenstartServer()read it. When the variable was missing, the code defaulted to0, causing the calculationDate.now() - 0to equal the entire Unix timestamp (~1.77 trillion milliseconds ≈ 29 million minutes).How
cli/next-start.tsto setNEXT_PRIVATE_START_TIMEif it's not already set bybin/next.tsstart-server.tsto use0as the duration ifstartTimeis falsy, preventing the bugTest Plan
Run
next starton a production build and verify the "Ready in" time shows a reasonable value (e.g., "Ready in 523ms" instead of millions of minutes).