Error 502, Application failed to respond
emmakade
FREEOP

a year ago

Good day or good evening, I'm new on railway. I just deploy a laravel project to railway now, The deployment was successful but i can't access my links and api, i keep getting 502 error, kindly check below:

Application failed to respond

This error appears to be caused by the application.

If this is your project, check out your deploy logs to see what went wrong. Refer to our docs on Fixing Common Errors for help, or reach out over our Help Station.

Solved$10 Bounty

Pinned Solution

a year ago

Delete port=$PORT in both those commands and just have the PORT variable be set to 8000. Then make sure your domain points to 8000.

5 Replies

a year ago

What port do you have your domain pointing to?


samgordon

What port do you have your domain pointing to?

emmakade
FREEOP

a year ago

i didn't add any i allow railway to inject it automatically by defining this "php artisan serve --host=0.0.0.0 --port=$PORT" in my procfile

and also adding this to my deploy start command:

php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force && php artisan serve --host=0.0.0.0 --port=$PORT && chmod -R 775 storage bootstrap/cache


emmakade

i didn't add any i allow railway to inject it automatically by defining this "php artisan serve --host=0.0.0.0 --port=$PORT" in my procfileand also adding this to my deploy start command:php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force && php artisan serve --host=0.0.0.0 --port=$PORT && chmod -R 775 storage bootstrap/cache

emmakade
FREEOP

a year ago

Can i drop my Project Id?


a year ago

Delete port=$PORT in both those commands and just have the PORT variable be set to 8000. Then make sure your domain points to 8000.


samgordon

Delete port=$PORT in both those commands and just have the PORT variable be set to 8000. Then make sure your domain points to 8000.

emmakade
FREEOP

a year ago

thank you very much, it work


Status changed to Solved chandrika 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...