Service stuck in "complete" status
ilvalerione
PROOP

a month ago

A Railway service which contains a Laravel app stuck in the "complete" state after deploy.

It's green, but never goes "Online". I noticed in the Build logs it is locked on the "image push" task (see image attached).

If I try to access the public URL I get a 502 HTTP error.

Attachments

Solved$10 Bounty

Pinned Solution

ilvalerione
PROOP

a month ago

I found the problem following the documentation for Laravel deployment (https://docs.railway.com/guides/laravel). The initial script after every deployment must run as pre-deploy command for the http service and as start command for cron and queue worker services. I had configured the script as start command for all. Moving the script from start command to pre-deploy command in app service solved the problem.

8 Replies

Railway
BOT

a month ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


ilvalerione
PROOP

a month ago

There are no solutions in these posts other than retry later.


ilvalerione
PROOP

a month ago

Even after several retry, the service still stuck in "complete" status, and the public URL returns a 502 HTTP error. I have other 2 services with the same application code, one for the cron scheduler, and another for the workers, and they are correctly Online.

In Build Logs, the "image push" task still running indefinitely (see the image attached in the first message of this thread).


noahd
EMPLOYEE

a month ago

Could I get a link to the service thats stuck? All appear online at an initial glance.


Status changed to Awaiting User Response Railway about 1 month ago



Status changed to Awaiting Railway Response Railway about 1 month ago


brody
EMPLOYEE

a month ago

The image push finished, and your app started without issue. It's just a rounding error for the progress and us not switching from a spinner to a check, purely a UI quirk.

Completed means your app has exited. It wouldn't be a problem with our platform or product, so I have opened this thread up to the community so they can help you debug why your application may be exiting.


Yeah as brody said, I've only ever seen the completed status when a job exits with a exit code of 0 (success). Basically means that your services process just finished running and closed.

I'm not familiar with laravel so can't help too much there but are you able to start the apps in production mode with the same configuration on localhost?

Seems like the app is building and then the deploy step exits immediately. I would start by checking if your start command matches what you would expect


ilvalerione
PROOP

a month ago

I found the problem following the documentation for Laravel deployment (https://docs.railway.com/guides/laravel). The initial script after every deployment must run as pre-deploy command for the http service and as start command for cron and queue worker services. I had configured the script as start command for all. Moving the script from start command to pre-deploy command in app service solved the problem.


Status changed to Solved brody about 1 month ago


Loading...