We’re not talking about occasional random restarts – we understand that can happen for any number of reasons on Render’s side. We’re seeing immediate, consistent restarts every time we deploy. We’re stumped on debugging this and believe it’s a problem on Render’s side.
- The instance is the Starter tier (not the free tier).
- The runtime is Node.
- There are no error messages in the logs.
- The server is responding to the health check: https://lexiguess.onrender.com/health
- After the restart, the server continues running as normal.
- This seems to happen consistently with every deploy.
- Other behavior from the app implies it restarts a third time, but this does not appear in the logs.
You can see the restart in the log excerpts below.
Jul 31 12:51:45 PM ==> Using Node version 16.20.1 via /opt/render/project/src/package.json
Jul 31 12:51:45 PM ==> Docs on specifying a Node version: https://render.com/docs/node-version
Jul 31 12:51:45 PM ==> Starting service with 'node app.js'
Jul 31 12:51:45 PM [various app-specific output as expected]
Jul 31 12:51:45 PM [app] is running; listening for events from the web
Jul 31 12:51:46 PM DEBUG nonce: XTSU41jW7+4QbzSBYVd9xA==
Jul 31 12:52:42 PM ==> Using Node version 16.20.1 via /opt/render/project/src/package.json
Jul 31 12:52:42 PM ==> Docs on specifying a Node version: https://render.com/docs/node-version
Jul 31 12:52:42 PM ==> Starting service with 'node app.js'
Jul 31 12:51:45 PM [repeat of various app-specific output]
Jul 31 12:52:42 PM [app] is running; listening for events from the web
Jul 31 12:52:44 PM DEBUG nonce: iL9SKw+3uKSl/Y3h5hyK0A==
Any ideas what could be causing these restarts?
Do you have more than one instance running of this app? (Scaling section after clicking the application on the Dashboard). This sounds more like > 1 instance of the app rather than random restarts.
Ah, good question; I should’ve included that in the list of “relevant facts”. But, no, that doesn’t seem to be the explanation:
PS: But you’ve now made us realize that that an additional rogue instance of the app could indeed explain this, even if not due to scaling settings. If so, does it sound possible that that could be Render’s fault somehow?
We’re now trying to debug this by creating lockfiles. But it seems like different instances of the app don’t share the same filesystem? Is that true?
That’s correct. Even when you have multiple instances of an app, each instance is an isolated container executing the app.
I think you should contact us directly, the best method is via the “Contact Support” link at the bottom of the Dashboard, so we can look into this at a lower level, and share more information about your app non-publicly.
We’re now working on this in a support thread (thank you!) and I’m just giving a status update here for anyone, like our future selves, following along:
- We seem to have ruled out multiple instances. We believe our app is crashing or getting killed by Render and then restarting.
- We can’t replicate this outside of Render. We even tried in Docker container and it doesn’t crash locally but with the same Docker container on Render, it does crash.
- We tried deploying to Replit and it works like a charm there, convincing us even more that there’s a bug on Render’s side.
- It could still be something wrong we’re doing, of course, that Replit and our local dev environments somehow manage to be robust to, but in that case we believe the Render bug would be the lack of diagnostics like an exit code or something in the logs about our app crashing or getting killed.
Update: There are plenty of things worse about Replit’s hosting than Render’s so we do still care about getting this figured out. Also we’re just dying to learn the resolution of this mystery!
There may have been an email glitch on my end with the support thread so I wanted to ping @Jason-Render here before this thread auto-closes. Latest is that we’re still resorting to Replit hosting for this project.