3 months ago
i get this issue:
Uh oh. Your deployment for Primary in patient-endurance crashed within the production environment.
i cannot load my n8n.
i haven't touch this service for over 2 weeks, i dont know what caused it but clearly it is a result of a railway internal issue.
please resolve this
8 Replies
3 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open Railway • 3 months ago
3 months ago
postgres looks like this:
redis - it wont allow me to restore a backup.
see image
both n8n - worker and primary - just suddenly crashed and all services cannot be restored i have no idea how to resolve this.
i think all these crashes happened after a scheduled railway update + i didnt use any of the systems in the past 2 weeks - so its not my work.
and this is the error i get on the n8n deployment
0x5b62656e5d
Are you database(s) online and healthy?
3 months ago
thanks for responding, i've shared more info above.
shak123456
thanks for responding, i've shared more info above.
3 months ago
That could be a memory issue as well. Your service might be running out of available memory. Check your resource usage in the Metrics tab to see if memory consumption was spiking before the crash. If it is, you can try increasing the memory limit in your service settings, or look into optimizing your n8n workflows to reduce memory usage.
3 months ago
Also, based on your screenshot, the deployment itself is actually succeeding (Initialization and Deploy both pass), but it's failing at the Healthcheck stage. This means n8n is starting but isn't responding on the expected port in time.
First, make sure n8n is listening on the correct port. Railway expects your app to bind to the PORT environment variable, so check that your N8N_PORT variable matches or isn't set so it defaults to Railway's PORT.
Second, check if your Postgres database is actually reachable. If n8n can't connect to Postgres on startup, it can hang indefinitely waiting for a DB connection instead of starting the web server. Since you mentioned Postgres looks off and Redis won't restore, n8n likely can't finish booting. Try redeploying Postgres first, make sure it's fully healthy, and then redeploy n8n after.
Lastly, check the deploy logs by clicking "View logs", there should be output showing where n8n gets stuck during startup. That will confirm whether it's a database connection issue or something else. This pattern of a healthcheck timeout after a long untouched period is commonly caused by a database going into a bad state, not necessarily a Railway platform issue.
bernardofilipe123r-lab
That could be a memory issue as well. Your service might be running out of available memory. Check your resource usage in the Metrics tab to see if memory consumption was spiking before the crash. If it is, you can try increasing the memory limit in your service settings, or look into optimizing your n8n workflows to reduce memory usage.
3 months ago
thanks i have checked - not a memory issue - the app wasnt in use in the past 2 weeks as well.
bernardofilipe123r-lab
Also, based on your screenshot, the deployment itself is actually succeeding (Initialization and Deploy both pass), but it's failing at the Healthcheck stage. This means n8n is starting but isn't responding on the expected port in time. First, make sure n8n is listening on the correct port. Railway expects your app to bind to the `PORT` environment variable, so check that your `N8N_PORT` variable matches or isn't set so it defaults to Railway's `PORT`. Second, check if your Postgres database is actually reachable. If n8n can't connect to Postgres on startup, it can hang indefinitely waiting for a DB connection instead of starting the web server. Since you mentioned Postgres looks off and Redis won't restore, n8n likely can't finish booting. Try redeploying Postgres first, make sure it's fully healthy, and then redeploy n8n after. Lastly, check the deploy logs by clicking "View logs", there should be output showing where n8n gets stuck during startup. That will confirm whether it's a database connection issue or something else. This pattern of a healthcheck timeout after a long untouched period is commonly caused by a database going into a bad state, not necessarily a Railway platform issue.
3 months ago
thanks.
RE this: "First, make sure n8n is listening on the correct port. Railway expects your app to bind to the PORT environment variable, so check that your N8N_PORT variable matches or isn't set so it defaults to Railway's PORT." - which port does it need to be set to? also i dont have a N8N_PORT, on n8n , i only have PORT which is set to 5678 (see image the vars i have on n8n).
it seems like it cannot connect to DB, see logs of n8n below:
The issue is that i have no clue of to fix this...