Nextjs docker container crashing with no logs

spennyp
PRO

a year ago

Testing out Railway in hopes to move a Nextjs app here from Vercel.

Dockerized Nextjs runs fine, but when I point the production domain to the Railway app, seeing it's intermittently crashing and restarting with no logs (roughly a few times an hour). Unable to reproduce running container locally so far.Any ideas?

Solved

8 Replies

a year ago

Do you see any container event logs?


spennyp
PRO

a year ago

The only log related to the crash is "container event container died". But, not seeing anything related to the actual reason (unless I am missing something).

Attachments


a year ago

Those would be runtime event logs from Railway.What do your memory metrics look like?


spennyp
PRO

a year ago

Here is CPU and memory metrics when the app was in production.Reviewing the logs closer, looks like it actually crashed ~30 times during this 1.5hr period.

Attachments


spennyp
PRO

a year ago

When using nixpack instead of a custom Dockerfile, it still crashes but return:"ELIFECYCLE  Command failed with exit code 137."Leading me to believe a RAM issue. Will try upgrading and see if it goes away


a year ago

That's why I was thinking, an out of memory issue, the metrics recording may not capture very fast spikes due to the recording frequency.

After upgrading to Hobby make sure to do a redeploy.


Status changed to Solved railway[bot] about 1 year ago


spennyp
PRO

a year ago

After upgrading, so far so good!


a year ago

Glad to hear it!