Deployment are failing
bpetetot
PROOP

a year 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 ?

5 Replies

a year 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 • about 1 year ago


a year 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


bpetetot
PROOP

a year 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.


bpetetot
PROOP

a year ago

I identified something strange.

In the failing deployment logs, the Nixpacks logs shows an incorrect start command:

But in the previous (successful) deployments it was:

Do you have any idea ?

Do you know why I can't go back to previous successful deployments?


bpetetot
PROOP

a year 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


bpetetot

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/1257Now 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

am-77
PRO

7 months ago

thanks for sharing, that fixed for me


Loading...