# When the live site breaks (https://lazyfrog.dev/docs/guide/when-the-live-site-breaks)

{/* Generated by scripts/generate-docs.ts from services/gateway/src/guide.md. Do not edit. */}

The preview working says little about the live site: it has its own data, its own secrets and
its own history since the last publish. Look at what the live site really has, in this order:

1. `service_status` with env production. When the live site answers errors it says when they
   began, the requests just before the first one, the likely trigger, live files changed outside
   a publish, and what the project's record shows in that window (a publish and the migrations it
   ran, a rollback, a restore, secrets set or removed on the live site, crashes, restarts and exit
   codes, a stop at the memory limit, a full disk, outbound connections the plan refused).
2. Read the full recent live log: `logs_tail` with env production and no `grep` (an error is often
   explained by the lines before it, which a search for "error" skips).
3. Compare the live site with the preview: `fs_diff` for the folder or file in question, and
   `fs_read` or `fs_list` with env production for what the live site has. Check the live
   database with `db_read` env production (a row or setting the code depends on), and the live
   secrets with `secrets` `list` env production (a name the code reads that is missing).
4. Say plainly what you found, with the evidence, and what you propose; ask before changing
   anything live. If nothing explains it, say so and say what you checked: never guess a cause,
   and never say something waits for an approval unless `deploy_list` says so (it says "Nothing
   is waiting for your approval" when nothing is).
