R
Railwayβ€’8mo ago
bfortuna.dev

Inquiry Regarding Hobby Plan and Website Performance

I have a concern regarding the hobby plan. Is there any reason why the first time, after a certain amount of time, when accessing my website, it is slow? Project ID: 4a09cf4b-0845-4354-9484-08bd863b42c8
Solution:
railway has no cold starts by default, so this has to be something with your app
Jump to solution
20 Replies
Percy
Percyβ€’8mo ago
Project ID: 4a09cf4b-0845-4354-9484-08bd863b42c8
Brody
Brodyβ€’8mo ago
please provide more information, what kind of website? what's your tech stack? how slow are you talking? and anything else you may think is even remotely relevant
bfortuna.dev
bfortuna.devβ€’8mo ago
Hey Brody! I develop the eCommerce website in Python using Flask. It's an eCommerce site that currently has no traffic (has not been published or promoted yet). I'm using PostgreSQL as the database. When I mention it being slow, it's only when I access it around 12 hours later. It takes a long time to load any of the pages. After 1-2 minutes, it runs completely smoothly. I don't encounter these types of problems locally. πŸ™‚
Brody
Brodyβ€’8mo ago
after this 12 hour period, how long would a single page load take?
bfortuna.dev
bfortuna.devβ€’8mo ago
1-2 minutes aprox
Brody
Brodyβ€’8mo ago
and you're running this flask app with gunicorn right?
bfortuna.dev
bfortuna.devβ€’8mo ago
Yep!
Brody
Brodyβ€’8mo ago
what's your start command
bfortuna.dev
bfortuna.devβ€’8mo ago
No description
bfortuna.dev
bfortuna.devβ€’8mo ago
You mean this?
Brody
Brodyβ€’8mo ago
gunicorn has a request timeout of 30 seconds, I'm not too sure how you would have a singular request that takes 1-2 minutes
bfortuna.dev
bfortuna.devβ€’8mo ago
I understand... nonetheless, do you know if there's any way to reduce the time, either to 30 seconds or (1-2 minutes)?
Brody
Brodyβ€’8mo ago
I'm not sure where this additional time is coming from, would you happen to have app sleeping enabled?
bfortuna.dev
bfortuna.devβ€’8mo ago
Where is that enabled/disabled?
Brody
Brodyβ€’8mo ago
in the service settings, it's off by default, and only available to beta users, if you don't see it then it is for sure off
bfortuna.dev
bfortuna.devβ€’8mo ago
In that case, would there be nothing to do then?
Solution
Brody
Brodyβ€’8mo ago
railway has no cold starts by default, so this has to be something with your app
Brody
Brodyβ€’8mo ago
I mean if this was an issue with railway I would be seeing a whole lot of reports about it
bfortuna.dev
bfortuna.devβ€’8mo ago
I understand. Well, thank you, Brody πŸ™‚
Brody
Brodyβ€’8mo ago
I really wish I knew what was wrong