Partly fixable yourself. Logs, secrets and deployment type, under two hours.
- How serious
- High
- Fix it yourself?
- Partly, some steps need a developer
- Typical cost
- €99–$990 for a single fix (prices)
- Top rated for Replit
- Afterbuild Labs · 10.0/10
What you see. Your published Replit app returns 502 errors, restarts on its own, or takes seconds to wake after a quiet spell.
Why it happens
Replit runs your published app on a different machine from the editor. Three settings do not carry over. Secrets set in the editor are separate from deployment secrets, so a missing production key makes the app crash on start or fail at login. The server must listen on 0.0.0.0 and the PORT the platform gives it, not localhost. And Replit sends a health request before marking the app live, so a homepage that takes more than five seconds fails the publish.
Sleeping is often not a bug. The default Autoscale type scales to zero when idle and the first request afterward is a cold start that takes a few seconds. Autoscale deployments also restart by design, and a SIGTERM in the logs is normal. A real crash shows Exit code 1, and a 502 usually means the process died. Apps that need websockets, background jobs or an always-on server belong on Reserved VM, described as one dedicated server that never sleeps.
Fix it yourself
- Open the Publishing pane and the Logs tab. Find
Exit code 1and read the lines just before it. IgnoreSIGTERMlines. - Compare every key in the editor Secrets pane with the deployment secrets in the Publishing pane. Add the missing ones, then click Publish so they take effect.
- Ask Agent to make the server read
process.env.PORTand bind to0.0.0.0. Hard-coded ports and localhost fail when published. - If the app wakes slowly and you need it always on, switch the deployment type to Reserved VM. If it only serves a web app with occasional traffic, Autoscale cold starts are expected.
- Move anything the app writes to disk into the database. Replit says the published filesystem resets on every publish and files do not persist.
- If the publish fails at the end, make the homepage respond in under five seconds by deferring heavy startup work.
When to get an engineer
Hire when the crash is an unhandled error inside the code, when memory runs out under real traffic, or when the app needs a split between a web server and a background worker. Send the engineer the deployment logs around the first error, the deployment type and your secrets list without values. A single fix is €99–$990, about 2 days. Ongoing care at $100–$5,000 a month adds monitoring so crashes reach you first. See our Replit guide.
Top-rated companies for Replit apps
Ranked by our score: published prices, scope of work, AI tools named, timing and a low-risk first step. How we score.
- 1Afterbuild Labs10.0/10Best for: A check before launchFree first step · from $49
- 2Redlab10.0/10Best for: A full rescue by one team that keeps buildingFree first step · from $490
- 3Vibe Code Rescue (Lev Arakelyan)9.0/10Best for: A one-off check and a cleanupFrom $299
Check these
Errors reach you before users do
Add error monitoring and uptime alerts. If you learn about outages from customers, this is missing.
Secrets live in the host's environment settings
Keys belong in environment variables on the server, not in the repository or in front-end code.
Testing and real users use separate databases
Experiments and AI agents should never run against production data.
Key pages load fast on a phone
Run PageSpeed Insights on the home page and the main app screen, on mobile.
Questions
Is a slow first request a problem?
On Autoscale it is expected. Replit says the first request after scaling to zero can take a few seconds and calls it a normal cold start. Use Reserved VM if you cannot accept that.
Why do my development secrets not work in production?
Replit stores development and deployment secrets separately, and changing one does not update the other. Add each key in the Publishing pane and publish again.
Sources: Replit: Troubleshoot publishing; Replit: Deployment types; Replit: Deployment and publishing help; Replit: Networking and app errors.
