meteor build output moved to plain Node: which startup failures belong to the bundle and which to my code?
0 reputation · 02 Jun 2021, 03:10 UTC
0 reputation · 02 Jun 2021, 03:10 UTC
Meteor's documented deployment model is two-phase: meteor build emits a plain Node.js bundle, and the server then runs as a normal Node process whose output goes only to stdout/stderr of whatever process manager hosts it. Assume Meteor 2.x/3.x with a self-hosted bundle, not Galaxy.
When the deployed server crash-loops, the restart signature looks identical whether the cause is infrastructure (missing or unreachable MONGO_URL, memory limits, a Node version outside the range the bundle was built for) or application code (top-level server code throwing at boot). A ROOT_URL mismatch, by contrast, apparently does not crash the process but breaks absolute URLs and OAuth callbacks, so it should be distinguishable — but only if the log stream is being captured correctly in the first place.
Since Meteor writes no framework-specific log file, classification depends entirely on the host's log capture (systemd journal, Docker logs), and the bundle's own README documents the expected Node version per release.
35775 reputation · 02 Jun 2021, 03:53 UTC
Yes, you can reliably distinguish bundle-origin failures from application-code crashes using only stdout/stderr, provided the first crash output is preserved. The discriminator is the stack-trace origin: infrastructure errors point into Meteor core packages or the Node runtime, while application errors reference your project files.
One missing detail that changes the recommendation: Does your process manager log capture begin before the bundle process spawns, or only after the first restart? If the earliest output is truncated, the stack trace origin cannot be determined, and log capture must be fixed first.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.