Hi, I just deployed a simple crud (Rails 3.1) to heroku, and it takes
more
than 5 seconds to load the index page.
Does anyone know how to solve this?
Ps.: locally it takes less than 500 ms, and have more data at the
database.
Thanks in advance.
Hi, I just deployed a simple crud (Rails 3.1) to heroku, and it takes
more
than 5 seconds to load the index page.
Does anyone know how to solve this?
Ps.: locally it takes less than 500 ms, and have more data at the
database.
Thanks in advance.
On Tue, Jan 31, 2012 at 11:56 AM, Rodrigo R.
[email protected]wrote:
Hi, I just deployed a simple crud (Rails 3.1) to heroku, and it takes more
than 5 seconds to load the index page.Does anyone know how to solve this?
Ps.: locally it takes less than 500 ms, and have more data at the database.
Thanks in advance.
Have you tried (in console)
$ heroku logs
It could help, but I have the same problem… sometimes. After that the
application works fine
Javier Q.
That is weird, in the logs it looks like everything is working smoothly,
but when I try to access it, takes me about 5 seconds.
On Tue, Jan 31, 2012 at 12:04 PM, Rodrigo R.
[email protected]wrote:
That is weird, in the logs it looks like everything is working smoothly,
but when I try to access it, takes me about 5 seconds.
It seems that (for example) if I access the app yesterday and then I
access
now, the server starts again (that’s what my log says)
I’ve never checked this before, but that make the access too slow (the
first time)
On 31 Jan 2012, at 18:27, Javier Q. wrote:
That is weird, in the logs it looks like everything is working
smoothly, but when I try to access it, takes me about 5 seconds.It seems that (for example) if I access the app yesterday and then I
access now, the server starts again (that’s what my log says)
I’ve never checked this before, but that make the access too slow
(the first time)
That’s normal behavior, it frees up memory on the server that’s just
sitting around doing nothing. That’s also how Passenger works by
default. It “intelligently” spawns and kills off instances.
But rest assured, if your application has more users accessing it, it
won’t be suspended.
Best regards
Peter De Berdt
On Tue, Jan 31, 2012 at 12:19 PM, Dieter L. [email protected]
wrote:
On Tue, Jan 31, 2012 at 11:04 AM, Rodrigo R. [email protected] wrote:
That is weird, in the logs it looks like everything is working smoothly, but
when I try to access it, takes me about 5 seconds.
I can’t be sure, but… AFAIK
Does this only happen the first time the page is loaded?
Heroku unloads applications. Both when it’s deployed, and after
periods of inactivity. The first load after it’s been unloaded is
always slow.
–
Greg A.
http://twitter.com/akinsgre
I believe this to be the root issue. That’s why things like reserved
instances at AWS are sometimes better because they stay up all the time.
I understand the Google App engine is the same way. Makes it unusable
for Grails apps because spinning up the JVM is so slow the app startup
even times out causing no load at all.
On Tue, Jan 31, 2012 at 6:12 PM, Paulo Gabriel Poiati <
[email protected]> wrote:
Heroku put you app into a sleep mode when it’s no accessed in a
certain amount of time. Sometimes when no one visited you application in
the last several minutes and whoever access it, the app will bootstrap,
this process can take several minutes. But this only occurs in the first
request, subsequents request should run fast.
And of course, there are people pinging their own “low traffic” app
as a work-around … Not sure what I have to think about that practice.
Is it costly/wasteful for the operator?
Peter
On Tue, Jan 31, 2012 at 18:02, Peter V.
[email protected] wrote:
And of course, there are people pinging their own “low traffic” app
as a work-around … Not sure what I have to think about that practice.
Is it costly/wasteful for the operator?
Off the top of my pointy little head, it seems that each one, if it’s
a reasonably small app, as I’d expect most free ones to be, should be
negligible cost… but since so many people use Heroku for free, it’s
likely to add up to something significant. Wouldn’t be surprised if
Heroku starts forbidding it. However, there’s no way they can really
detect what’s a “just keep the app live” ping. Maybe they’ll just ask
us nicely not to do it.
For paid ones, which are likely to be larger, maybe there would be
some cost… but then that’s the customer’s decision.
-Dave
–
Dave A.: Available Cleared Ruby on Rails Freelancer
(NoVa/DC/Remote) – see www.DaveAronson.com, and blogs at
www.Codosaur.us, www.Dare2XL.com, www.RecruitingRants.com
maybe is something with the content that is heavy to load
It isn’t that, I’m sure.
Heroku put you app into a sleep mode when it’s no accessed in a
certain amount of time. Sometimes when no one visited you application in
the last several minutes and whoever access it, the app will bootstrap,
this process can take several minutes. But this only occurs in the first
request, subsequents request should run fast.
[]'s
Paulo Poiati
On 1 February 2012 16:46, Rodrigo R. [email protected] wrote:
It isn’t that, I’m sure.
You have not (unless I missed it) confirmed whether it is only the
first time that you access the app after a period of inactivity that
you see the problem. If it is only on the first access then it is
just the time taken to start the app up as noted by other posters.
Colin
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
–
gplus.to/clanlaw
Sorry, it is just that I haven’t had time to test it from my home (with
good internet connection), I’ve only tested at work (and at iPhone with
3G), so that might also be a problem.
But no, it is not just the first time. I was just waiting to answer
until I
had tested with a better connection.
Although I don’t think connection is the problem.
While on the subject does anyone know what heroku’s timeout is before it
brings down an app?
Adrian C. wrote in post #1044103:
While on the subject does anyone know what heroku’s timeout is before it
brings down an app?
It will bring your app down after 1 hour of inactivity. Our problem was
also that the first request takes a lot of time because the application
has to start-up again.
We found a nice solution ( http://www.wekkars.com ) that just does what
we want, keep our application alive.
Dries Steenhouwer wrote in post #1054162:
Adrian C. wrote in post #1044103:
While on the subject does anyone know what heroku’s timeout is before it
brings down an app?It will bring your app down after 1 hour of inactivity. Our problem was
also that the first request takes a lot of time because the application
has to start-up again.We found a nice solution ( http://www.wekkars.com ) that just does what
we want, keep our application alive.
Isn’t this like pooing in your own nest?
The reason that apps are taken down is to share resources with apps that
need them.
If everyone pings their apps, the resource usage will (I am guessing?)
skyrocket, and we would either kiss goodbye to free services like
Heroku, or all suffer them getting slow when we need them.
I’m open to hearing why I’m wrong, but on face value this looks sick…
On Oct 15, 2012, at 8:10 PM, Martin G. wrote:
we want, keep our application alive.
I’m open to hearing why I’m wrong, but on face value this looks sick…
The other solution is, of course, to scale to more than 1 web dyno.
“Apps that have more than 1 web dyno running are never idled out.
Workers dynos are never idled out.”
The goal should be to have monetized your app such that it makes sense
to pay for some of the scalability that the Heroku platform makes
possible.
Even Wekkars is setting themselves up to become a paid service. Then
you’ll have to weight the cost of the service that keeps your free
service from idling against the cost of a service that doesn’t get
idled.
-Rob
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs