DEV Community

Cover image for Your Heroku App Is Slow to Load Because Of This.

Your Heroku App Is Slow to Load Because Of This.

Elijah Trillionz on April 17, 2021

No doubt that Heroku is a great tool for developers. One particular reason for me is its generosity. I will explain how Heroku Dynos If...
Collapse
 
danidiaztech profile image
Daniel Diaz

I found really useful your article, so thanks for sharing it!
But from a couple of years until now, heroku had set protection against these tools, so now the platform has certain restrictions.
An example is that a free heroku app must sleep at least a hour a day, if it passes the restriction, you'll be charged.

Collapse
 
elijahtrillionz profile image
Elijah Trillionz

Oh wow.
I didn't know about this. I will look into this. Thanks

Collapse
 
bairrada97 profile image
bairrada97

if app is asleep and 10 users enter at same time will be slow for only 1 user or for 10 users?
Also if you usually have an app with 1k visitors is it really that bad that only 1 will get slow load?
But really nice solutions and I might apply to my projects

Collapse
 
elijahtrillionz profile image
Elijah Trillionz

Good question @bairrada97 . If the app is asleep it will only be slow to load for the first person to wake the app.
So if I am the first person to load the app, then it will only be slow for me, if after 5 minutes someone else tries to load the app, it will not be slow.

For the second question:
Yeah it's not that bad for just one person (that's why I consider Heroku generous). But why does my app need to sleep anyway if I have more than enough hours per month

Collapse
 
quangpl profile image
Quang Phan

I'd like to refer npmjs.com/package/awake-heroku that is useful for heroku

Collapse
 
elijahtrillionz profile image
Elijah Trillionz

That's a good resource. Have you tried it before?

Collapse
 
nguyentran6698 profile image
nguyentran6698

Thank you so much for sharing.

Collapse
 
elijahtrillionz profile image
Elijah Trillionz

Glad you found it useful

Collapse
 
safventure11000 profile image
Saf11000

It works! Thanks for sharing.

Collapse
 
elijahtrillionz profile image
Elijah Trillionz

Enjoy!

Collapse
 
cdthomp1 profile image
Cameron Thompson

Insightful!

Collapse
 
yongchanghe profile image
Yongchang He

Interesting! Thank you for sharing this!