R
Railway8mo ago
Fabiana

Application failed to respond

When I run my project locally, it's working fine but when I made the deploy, didn't run with --host=0.0.0.0. I am using python, flask, waitress and a few days ago I have deployed another project that's working fine. The logs of the 2 replics are: INFO:waitress:Serving on http://0.0.0.0:8080 INFO:waitress:Serving on http://0.0.0.0:8080 What's happening please? Thank you
Solution:
change the start command in your Procfile to this waitress-serve --host=0.0.0.0 --port=$PORT app:app...
Jump to solution
42 Replies
Percy
Percy8mo ago
Project ID: N/A
Fabiana
Fabiana8mo ago
ok 19fc1404-63f7-49bb-a509-04836491603b
Fragly
Fragly8mo ago
You need to set your PORT service variable to 8080 if you haven't already you can read more on why here: https://docs.railway.app/troubleshoot/fixing-common-errors
Fabiana
Fabiana8mo ago
I have donne that I have done
Fragly
Fragly8mo ago
So your host is 0.0.0.0 and you've set your PORT service variable to8080?
Fabiana
Fabiana8mo ago
yes
Fragly
Fragly8mo ago
Then I have no idea why that is happening
Fabiana
Fabiana8mo ago
thank you, neither do I
Brody
Brody8mo ago
you would only set a PORT service variable to a fixed PORT if it is not easy to get the app to listen on the randomly generated PORT, it is always best to listen on the PORT Railway assigns automatically @Fabiana what is your current start command?
Fragly
Fragly8mo ago
Sorry, I thought flask what that one framework where it's difficult to change the PORT probably misremembered
Brody
Brody8mo ago
typically flask apps are run with gunicorn and gunicorn listens on the appropriate host and port by default, with waitress it should be as simple as providing a port or bind flag
Fragly
Fragly8mo ago
Thank you for telling me 🙏
Brody
Brody8mo ago
I need to first know what their current start command is so I can provide them with an appropriately modified start command
Fabiana
Fabiana8mo ago
waitress-serve --host=0.0.0.0 --port=8080 app:app
Brody
Brody8mo ago
are you building with a dockerfile?
Fabiana
Fabiana8mo ago
no no
Brody
Brody8mo ago
how are you setting that start command there's no need to ping reply, I'm here
Fabiana
Fabiana8mo ago
in a Procfile
Brody
Brody8mo ago
is the start command in your service settings empty?
Fabiana
Fabiana8mo ago
in the service settings I am using that one
Brody
Brody8mo ago
is the start command in your service settings empty? (yes/no)
Fabiana
Fabiana8mo ago
no
Brody
Brody8mo ago
clear it
Fabiana
Fabiana8mo ago
Railway?
Brody
Brody8mo ago
yes, the service settings would be in railway
Fabiana
Fabiana8mo ago
I'm using this waitress-serve --host=0.0.0.0 --port=8080 app:app
Brody
Brody8mo ago
is the start command in your service settings empty? (yes/no)
Fabiana
Fabiana8mo ago
no
Brody
Brody8mo ago
clear it yes I know it's a process fragly
Fabiana
Fabiana8mo ago
yes it is I use the same in another one last week and it's working fine
Brody
Brody8mo ago
do you have a PORT service variable set, in railway? (yes/no)
Fabiana
Fabiana8mo ago
no should I?
Brody
Brody8mo ago
no you shouldn't
Solution
Brody
Brody8mo ago
change the start command in your Procfile to this waitress-serve --host=0.0.0.0 --port=$PORT app:app
Fabiana
Fabiana8mo ago
ok This site can’t be reachedThe webpage at http://0.0.0.0:7334/ might be temporarily down or it may have moved permanently to a new web address. ERR_ADDRESS_INVALID 😥
Brody
Brody8mo ago
did you try opening that URL with 0.0.0.0 in it???
Fabiana
Fabiana8mo ago
It' s working Thank you!!!!!!!!!!!!! Very much!!!!!!!!!!
Brody
Brody8mo ago
yeah you need to use the railway domain lol no problem!
Fabiana
Fabiana8mo ago
Good to know! I'm learning, thank you!
Brody
Brody8mo ago
fragly, study up
Fragly
Fragly8mo ago
o7
Fabiana
Fabiana8mo ago
🥰
Want results from more Discord servers?
Add your server
More Posts
react-google-login in version "^5.2.2."I'm deploying my front end, and I'm encountering issues with the React version, which is 18, and theUprading to Pro from Hobby. Will I be double-billed?I recently upgraded from Hobby to Pro plan. Looking at the UI, I'm a little bit confused. I now haveHotel website using spring boot and react that the costumer can upload photos and edit textHello, i want to deploy a website for a hotel, for this website the costumer want to edit and changDeploying Remix app ends with error during build: RollupError: Could not resolve "../component" ...The import is correct and the build works perfectly fine for me locally. I've checked node and npm vHealth check not working for Strapi instanceI have a Strapi v4 instance running together with a Postgres Server. It seems that due to a knex errPostgres data lost after a few days of delayed payment. Please help 😣I have a postgres database running, I hadn't realized that the services were down due to none paymenUnban Request for Account - Sazumi VickyI, Sazumi Vicky, would like to submit an unban request for my account, which has been blocked with tPerformance Discrepancy Between Localhost and Railway Deployment using NodeJSI am experiencing a significant performance discrepancy between running a Node.js script on my localGithub actions testing and Railway CLII'm setting up Github actions in my repo to run my e2e testing before deploying to Railway. I need t1230 minutely GBs for a pet project 😓I've just deployed my Next.js app with serverless backend (Puppeteer & Socket.io) a couple days ago