Why Are My Basic Heroku Apps Taking Two Seconds to Load

Why are my basic Heroku apps taking two seconds to load?

  • If your application is unused for a while it gets unloaded (from the server memory).
  • On the first hit it gets loaded and stays loaded until some time passes without anyone accessing it.

This is done to save server resources. If no one uses your app why keep resources busy and not let someone who really needs use them ?

If your app has a lot of continous traffic it will never be unloaded.

There is an official note about this.

Why is heroku so sluggish?

If your application is running on free dyno, it goes to sleep when unused for 30 mins. You could find the information here.

You could verify the sleep by checking the logs heroku logs --tail.

You could add additional dyno other than free type to make it not to sleep. Dyno Types

Why is it taking so long for Meteor to load my data on Heroku?

Meteor gets loaded that fast locally, because it doesn't depend on your internet connection and the files can just be read from your harddrive and don't need to be downloaded.
And once the data is loaded it's the same everywhere you host, because the client (you) perform all actions on your cached mongo database and then just wait for the server to say if the action was alright or not.

But for the Heroku loading times, I have no idea, Sorry!

UPDATE:
These are the long-pulls from SockJS that is used by Meteor.
Normally these pulls only get Aborted on a hot code push (when a file is added/changed/removed).

Either you or Heroku seem to write or change something in the directory.
Because then a hot code push may be initiated by Meteor.

Rails app starts very slowly in Heroku

If you are on the free Heroku 1 dyno setup then the dyno will wind down after 1 hour of inactivity.

Should you pay for 1 or more extra dynos then none of you dynos will wind down and you will only ever face the bootup time when you push a new version.

You can choose to install the free New Relic add-on, and you can set this to ping your app every 2 minutes. This will stop it spinning down. http://addons.heroku.com/newrelic

Is it normal to experience long load time accessing your website on heroku?

Yes, this is completely normal.

There's information about it on devcenter.heroku.com: https://devcenter.heroku.com/articles/dynos#dyno-idling

If your application has one hour of inactivity your web dyno will idle out. If you access your application after one hour the web dyno will wake up again, causing a few seconds of delay.

Important:
This is only a problem when you have one (free) web dyno. If you have more then 1 web dyno running you will never face these troubles.

Why doesn't the code on Heroku get updated after updating the code on GitHub?

Heroku's GitHub integration has been disabled for over a month as part of a security response. It appears that it will remain disabled for another week or so:

Based on current progress, we plan to complete our investigation by May 30, 2022

We know you are waiting for us to re-enable our integration with GitHub, and we've committed to you that we will only do so following a security review. We will post more information to status.heroku.com when it is available.

You should have received emails about this from Salesforce (Heroku's parent company) on or around April 15 and May 4, 2022.

At the moment, your only option is to deploy using some other method. See this question for more details. The answers there suggest some alternative ways to deploy your code.

(Your Heroku password was also forcefully reset; if you have not yet changed it you'll need to do that when you log back in.)



Related Topics



Leave a reply



Submit