4 months ago
Hello,
My deployments are failing on my staging environments.
When I try to redeploy a previous working deployment, it also fails.
I see some unusual logs in deploy logs:
Starting Container
using config from file
adapted config to JSON
admin endpoint disabled
automatic HTTPS is completely disabled for server
started background certificate maintenance
server running
serving initial configuration
cleaning storage unit
finished cleaning storage units
handled request
handled request
handled request
handled request
handled request
handled request
handled request
handled request
handled request
handled request
handled request
handled request
handled request
handled request
Stopping Container
shutting down apps, then terminating
exiting; byeee!! 👋
servers shutting down with eternal grace period
shutdown complete
Is there an issue on Railway deployments ?
4 Replies
4 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 jake • 4 months ago
4 months ago
It appears your healthcheck is failing. Looks like something to do with your code.
Since it's an application level issue, I've opened this thread up publically in case the community might be able to help
4 months ago
The healthcheck is failing because the Railway deployment has not started the app server.
Usually when the server is starting I have these logs in the "deploy logs" tab
Starting Container
> conference-hall@1.0.0 start
> npm run start:db && npm run start:server
...
But in the failing deployments, the logs are different and I don't see my npm start
command anymore:
Starting Container
using config from file
adapted config to JSON
admin endpoint disabled
automatic HTTPS is completely disabled for server
started background certificate maintenance
server running
serving initial configuration
cleaning storage unit
finished cleaning storage units
...
And when I try to rollback a previous deployment (which was previously successful), it fails.
So I don't think it is an application level issue, otherwise the rollback should work.
4 months ago
4 months ago
I resolved the issue.
It was caused by the upgrade of NixPack. In NixPacks v1.32.0, they use Caddy for SPA using Vite: https://github.com/railwayapp/nixpacks/pull/1257
Now NixPacks runs the app using Caddy if it detects the application is using Vite and doesn't have a server. My app is using Vite, but not its default server, I have my own custom express server. So Nixpack runs the app in Caddy and it fails.
Setting the environment variable NIXPACKS_SPA_CADDY=false
disables the use of Caddy and fixes the deployments.
See doc: https://nixpacks.com/docs/providers/node#spa-application-support