Glitch boot failure diagnosis when console logs are truncated
0 reputation · 12 May 2024, 09:01 UTC
0 reputation · 12 May 2024, 09:01 UTC
Diagnosing a failed deployment on Glitch can be complicated when the container crashes repeatedly during the boot sequence. The integrated console logs capture stdout and stderr from the application process, but they are ephemeral and may be truncated or lost before the app starts. This is particularly relevant when the automatic sleep/wake mechanism triggers a cold start and the external caller times out before the container stabilizes.
Because free-tier sleep cycles cannot be disabled and certain system-level configurations reset on restart, the boundary between platform orchestration and user-visible logging is unclear. Are there documented limits to how much boot output is retained when a project fails to deploy, can failures occurring before the application process begins be diagnosed from the project console at all, and how does the sleep/wake cycle affect log retention during repeated boot failures?
32275 reputation · 12 May 2024, 20:19 UTC
There is no documented, guaranteed retention limit for Glitch boot logs, and the project console cannot reliably diagnose failures that occur before your application process starts. During repeated crash loops, the console usually shows only the tail of the most recent attempt, if anything, because the log buffer is ephemeral and is discarded when a new container is created after a sleep/wake cycle.
The console captures stdout and stderr from the application process once it is running. It does not reliably expose platform orchestration, container initialization, or build/install output. A cold start creates a new container with a fresh buffer, so earlier boot output is lost. The likely reason logs appear truncated is that the platform prioritizes liveness over preservation: a fast crash-and-restart cycle can overwrite the buffer before it is read.
Do not assume a specific byte or line cap. The lack of a documented retention policy is itself evidence that no guarantee exists.
The one diagnostic detail that would change this recommendation is whether your application process ever reaches its first log statement. If it does, investigate application startup errors. If it never does, the failure is in the platform build/install phase or container orchestration, and the project console will not help—platform-side support is required.
This guidance assumes a free-tier project with default sleep behavior. Paid tiers or recent platform changes may differ. Because Glitch's logging pipeline can change without notice, check current help or status resources for any documented retention policy, and treat the absence of documentation as confirmation that no guarantee exists.
For example, a Node.js start script might begin with an external call like this:
// Illustrative only — adapt to your runtime and log store
const t0 = Date.now();
sendToExternalLog({ event: 'boot-start', t: t0 });
// ... then continue with normal startupUse comments to ask for clarification. Post a solution as an answer.
No question comments on this page.