4 months ago
Every deploy (every push to main in GitHub), I get an email that the deploy has crashed. But nothing seems to be amiss at all, and the closest thing the logs show to an error is this warning, related to asset building AFAIK:
> npm warn config production Use --omit=dev instead.
The start command is:
rake db:prepare && bin/rails assets:precompile && bin/rails server -b 0.0.0.0 -p ${PORT:-3000}
It's a SQLite database, so the migrations have to be in the start command. I'm not sure why it was necessary manually to add the assets:precompile command, but it was.
9 Replies
4 months ago
Hello,
In this context, the old deployment exited with a non-zero exit code and is therefore counted as a crash.
Status changed to Awaiting User Response Railway • 4 months ago
4 months ago
Thanks—how can I see the old deployment exiting, and/or how can I stop it exiting with an error code? Other than these emails, there's no sign I can see of anything wrong.
Status changed to Awaiting Railway Response Railway • 4 months ago
4 months ago
(I'm using Railway's Railpack)
4 months ago
You can open the old deployment's logs. As for debugging, unfortunately, we cannot help debug user applications, but I can open this up to the community if you would like.
Status changed to Awaiting User Response Railway • 4 months ago
4 months ago
This is the end of the last deployment's logs. What indicates an error?(You see Rails logs and SolidQueue logs interleaved here, but they both seem to exit happily.)
Attachments
Status changed to Awaiting Railway Response Railway • 4 months ago
4 months ago
The application exited with an error. Your application doesn't necessarily need to print errors to exit with an error code.
But as mentioned before, we cannot help debug user applications. I can open this up to the community if you would like; otherwise, we would have to disengage here.
Status changed to Awaiting User Response Railway • 4 months ago
4 months ago
Ok, thanks. Yes, open to the community please.
Status changed to Awaiting Railway Response Railway • 4 months ago
4 months ago
Is there any way I can see the exit code?
4 months ago
Exited with a non zero exit code ..so its a crash ..from logs..try adding RAILWAY_DEPLOYMENT_DRAINING_SECONDS as a service variable to give SolidQueue time to finish in flight jobs before forced termination..To stop getting emails / non 0 exit code add exec to your start command
rake db:prepare && bin/rails assets:precompile && exec bin/rails server -b 0.0.0.0 -p ${PORT:-3000}
