I think this is a result of the virtual machine design Heroku is using.  One
of the ideas behind cloud computing is that your servers don't exist until
needed.  So if your server hasn't been used in an hour, all its resources
are removed from use.  That first request, then, takes some extra time as
the virtual instance is re-allocated, the code is started, and so forth.
I've noticed it on my apps, too.

Admittedly, such a long latency for that first request is pretty bad, but I
can't blame them for "turning my app off" if nobody's used it in an hour.

Also, is your app running in "development mode" or in "production mode"?  I
wonder if that might make a slight improvement...

...Paul

On Thu, Jan 8, 2009 at 9:31 AM, Matthew Moore <m3mo...@gmail.com> wrote:

>
> Hi,
>
> Some of my apps are seeing occasionally horrible performance - a
> greater-than 10 second response time - even for static files like
> index.html.
>
> From purely anecdotal experience, it seems like this is happening when
> the app hasn't been contacted for a few hours, and then on the first
> request after this dormancy, it will take a long time to start.  The
> second request will go much faster.
>
> Since I rely on these apps having a < 10s response time (which is
> fairly reasonable for 2 SQL queries per request) because I contact
> them via API, I was wondering if you guys had any advise.
>
> I could obviously just keep pinging my apps every hour, but this seems
> like a hack.  Do you have any other recommendations to prevent them
> from having what seems like a "startup" time?
>
>
> Thanks in advance!
> Matt
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to