Re: 1 hour inactivity idling and http caching

2011-01-07 Thread Oren Teich
Your app may not be setting the cache headers correctly.  If your
resource is cached, it will never hit the dyno.  If you look at the
logs, a cached hit will show up in nginx, but nothing else (e.g. no
web.1 process).  If you see a web.1 request, then it isn't getting
cached by varnish.

The only time we flush the cache is when you deploy.  Idling an app
will not impact cached content.

Oren

On Fri, Jan 7, 2011 at 3:03 AM, Martin Petrov  wrote:
> If this is the case then I should remove http caching in order to
> prevent the app from shutting down as much as possible.
> But... why requesting a cached page starts the app if the request is
> never handled by the app?
>
> On Jan 7, 11:18 am, Steve Smith  wrote:
>> I'm not an expert on this so I would double check, however I think this is 
>> all the case,
>>
>> If you only have one dyno then the app will shutdown when there are no 
>> requests for a certain time period. I believe this isn't the case once you 
>> have more than one dyno but in my experience at that point you have enough 
>> concurrent connections to keep things alive anyway.
>>
>> If you are caching the page it will be stored in varnish so the request will 
>> never be handed out to the app and will therefore allow the app to shutdown.
>>
>> Steve
>>
>> On 7 Jan 2011, at 09:02, Martin Petrov wrote:
>>
>>
>>
>>
>>
>>
>>
>> > Hi,
>>
>> > Looking at my logs I see that if my application is not used for 1 hour
>> > its state is changed from up to down. Next time a request comes it
>> > takes several seconds to start again.
>>
>> > Does requesting an http cached page keeps the application alive? My
>> > app has only one page, which is http cached.
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "Heroku" group.
>> > To post to this group, send email to her...@googlegroups.com.
>> > To unsubscribe from this group, send email to 
>> > heroku+unsubscr...@googlegroups.com.
>> > For more options, visit this group 
>> > athttp://groups.google.com/group/heroku?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Heroku" group.
> To post to this group, send email to her...@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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@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.



Re: 1 hour inactivity idling and http caching

2011-01-07 Thread Keenan Brock
Hi,

Heroku is providing a service for free. Which is great.
So if no one is using your app, heroku swap the app out out so other apps can 
use the memory for their free apps.
Think shared hosting.
But for free.

If you want your app to be a production app and always instantly available, 
then you may want to upgrade to 2 dynos ($36/month).

--Keenan

On Jan 7, 2011, at 10:12 AM, Jesse wrote:

> I set up http://pingdom.com/ to monitor my site, you can set it up to
> hit it every 5 minutes
> this will keep it 'up and running' on heroku as well as inform you of
> down time
> 
> you get 1 url for free
> 
> not sure if this will solve your problem as you have only 1 cached
> page, but something to consider?
> 
> - Jesse
> 
> On Jan 7, 3:44 am, Martin Petrov  wrote:
>> Well, you must be right. I don't have a very good understanding of how
>> it works. Thank you Smith!
>> 
>> On Jan 7, 1:08 pm, Steve Smith  wrote:
>>> Perhaps as the routing engine shuts down the app it also empties varnish. 
>>> That would actually seem quite likely?
>> 
>>> On 7 Jan 2011, at 11:03, Martin Petrov wrote:
>> 
 If this is the case then I should remove http caching in order to
 prevent the app from shutting down as much as possible.
 But... why requesting a cached page starts the app if the request is
 never handled by the app?
>> 
 On Jan 7, 11:18 am, Steve Smith  wrote:
> I'm not an expert on this so I would double check, however I think this 
> is all the case,
>> 
> If you only have one dyno then the app will shutdown when there are no 
> requests for a certain time period. I believe this isn't the case once 
> you have more than one dyno but in my experience at that point you have 
> enough concurrent connections to keep things alive anyway.
>> 
> If you are caching the page it will be stored in varnish so the request 
> will never be handed out to the app and will therefore allow the app to 
> shutdown.
>> 
> Steve
>> 
> On 7 Jan 2011, at 09:02, Martin Petrov wrote:
>> 
>> Hi,
>> 
>> Looking at my logs I see that if my application is not used for 1 hour
>> its state is changed from up to down. Next time a request comes it
>> takes several seconds to start again.
>> 
>> Does requesting an http cached page keeps the application alive? My
>> app has only one page, which is http cached.
>> 
>> --
>> You received this message because you are subscribed to the Google 
>> Groups "Heroku" group.
>> To post to this group, send email to her...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> heroku+unsubscr...@googlegroups.com.
>> For more options, visit this group 
>> athttp://groups.google.com/group/heroku?hl=en.
>> 
 --
 You received this message because you are subscribed to the Google Groups 
 "Heroku" group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to 
 heroku+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://groups.google.com/group/heroku?hl=en.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Heroku" group.
> To post to this group, send email to her...@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.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@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.



Re: 1 hour inactivity idling and http caching

2011-01-07 Thread Jesse
I set up http://pingdom.com/ to monitor my site, you can set it up to
hit it every 5 minutes
this will keep it 'up and running' on heroku as well as inform you of
down time

you get 1 url for free

not sure if this will solve your problem as you have only 1 cached
page, but something to consider?

- Jesse

On Jan 7, 3:44 am, Martin Petrov  wrote:
> Well, you must be right. I don't have a very good understanding of how
> it works. Thank you Smith!
>
> On Jan 7, 1:08 pm, Steve Smith  wrote:
>
>
>
>
>
>
>
> > Perhaps as the routing engine shuts down the app it also empties varnish. 
> > That would actually seem quite likely?
>
> > On 7 Jan 2011, at 11:03, Martin Petrov wrote:
>
> > > If this is the case then I should remove http caching in order to
> > > prevent the app from shutting down as much as possible.
> > > But... why requesting a cached page starts the app if the request is
> > > never handled by the app?
>
> > > On Jan 7, 11:18 am, Steve Smith  wrote:
> > >> I'm not an expert on this so I would double check, however I think this 
> > >> is all the case,
>
> > >> If you only have one dyno then the app will shutdown when there are no 
> > >> requests for a certain time period. I believe this isn't the case once 
> > >> you have more than one dyno but in my experience at that point you have 
> > >> enough concurrent connections to keep things alive anyway.
>
> > >> If you are caching the page it will be stored in varnish so the request 
> > >> will never be handed out to the app and will therefore allow the app to 
> > >> shutdown.
>
> > >> Steve
>
> > >> On 7 Jan 2011, at 09:02, Martin Petrov wrote:
>
> > >>> Hi,
>
> > >>> Looking at my logs I see that if my application is not used for 1 hour
> > >>> its state is changed from up to down. Next time a request comes it
> > >>> takes several seconds to start again.
>
> > >>> Does requesting an http cached page keeps the application alive? My
> > >>> app has only one page, which is http cached.
>
> > >>> --
> > >>> You received this message because you are subscribed to the Google 
> > >>> Groups "Heroku" group.
> > >>> To post to this group, send email to her...@googlegroups.com.
> > >>> To unsubscribe from this group, send email to 
> > >>> heroku+unsubscr...@googlegroups.com.
> > >>> For more options, visit this group 
> > >>> athttp://groups.google.com/group/heroku?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "Heroku" group.
> > > To post to this group, send email to her...@googlegroups.com.
> > > To unsubscribe from this group, send email to 
> > > heroku+unsubscr...@googlegroups.com.
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/heroku?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@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.



Re: 1 hour inactivity idling and http caching

2011-01-07 Thread Martin Petrov
Well, you must be right. I don't have a very good understanding of how
it works. Thank you Smith!

On Jan 7, 1:08 pm, Steve Smith  wrote:
> Perhaps as the routing engine shuts down the app it also empties varnish. 
> That would actually seem quite likely?
>
> On 7 Jan 2011, at 11:03, Martin Petrov wrote:
>
>
>
>
>
>
>
> > If this is the case then I should remove http caching in order to
> > prevent the app from shutting down as much as possible.
> > But... why requesting a cached page starts the app if the request is
> > never handled by the app?
>
> > On Jan 7, 11:18 am, Steve Smith  wrote:
> >> I'm not an expert on this so I would double check, however I think this is 
> >> all the case,
>
> >> If you only have one dyno then the app will shutdown when there are no 
> >> requests for a certain time period. I believe this isn't the case once you 
> >> have more than one dyno but in my experience at that point you have enough 
> >> concurrent connections to keep things alive anyway.
>
> >> If you are caching the page it will be stored in varnish so the request 
> >> will never be handed out to the app and will therefore allow the app to 
> >> shutdown.
>
> >> Steve
>
> >> On 7 Jan 2011, at 09:02, Martin Petrov wrote:
>
> >>> Hi,
>
> >>> Looking at my logs I see that if my application is not used for 1 hour
> >>> its state is changed from up to down. Next time a request comes it
> >>> takes several seconds to start again.
>
> >>> Does requesting an http cached page keeps the application alive? My
> >>> app has only one page, which is http cached.
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups 
> >>> "Heroku" group.
> >>> To post to this group, send email to her...@googlegroups.com.
> >>> To unsubscribe from this group, send email to 
> >>> heroku+unsubscr...@googlegroups.com.
> >>> For more options, visit this group 
> >>> athttp://groups.google.com/group/heroku?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Heroku" group.
> > To post to this group, send email to her...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > heroku+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/heroku?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@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.



Re: 1 hour inactivity idling and http caching

2011-01-07 Thread Steve Smith
Perhaps as the routing engine shuts down the app it also empties varnish. That 
would actually seem quite likely?

On 7 Jan 2011, at 11:03, Martin Petrov wrote:

> If this is the case then I should remove http caching in order to
> prevent the app from shutting down as much as possible.
> But... why requesting a cached page starts the app if the request is
> never handled by the app?
> 
> On Jan 7, 11:18 am, Steve Smith  wrote:
>> I'm not an expert on this so I would double check, however I think this is 
>> all the case,
>> 
>> If you only have one dyno then the app will shutdown when there are no 
>> requests for a certain time period. I believe this isn't the case once you 
>> have more than one dyno but in my experience at that point you have enough 
>> concurrent connections to keep things alive anyway.
>> 
>> If you are caching the page it will be stored in varnish so the request will 
>> never be handed out to the app and will therefore allow the app to shutdown.
>> 
>> Steve
>> 
>> On 7 Jan 2011, at 09:02, Martin Petrov wrote:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> Hi,
>> 
>>> Looking at my logs I see that if my application is not used for 1 hour
>>> its state is changed from up to down. Next time a request comes it
>>> takes several seconds to start again.
>> 
>>> Does requesting an http cached page keeps the application alive? My
>>> app has only one page, which is http cached.
>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Heroku" group.
>>> To post to this group, send email to her...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> heroku+unsubscr...@googlegroups.com.
>>> For more options, visit this group 
>>> athttp://groups.google.com/group/heroku?hl=en.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Heroku" group.
> To post to this group, send email to her...@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.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@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.



Re: 1 hour inactivity idling and http caching

2011-01-07 Thread Martin Petrov
If this is the case then I should remove http caching in order to
prevent the app from shutting down as much as possible.
But... why requesting a cached page starts the app if the request is
never handled by the app?

On Jan 7, 11:18 am, Steve Smith  wrote:
> I'm not an expert on this so I would double check, however I think this is 
> all the case,
>
> If you only have one dyno then the app will shutdown when there are no 
> requests for a certain time period. I believe this isn't the case once you 
> have more than one dyno but in my experience at that point you have enough 
> concurrent connections to keep things alive anyway.
>
> If you are caching the page it will be stored in varnish so the request will 
> never be handed out to the app and will therefore allow the app to shutdown.
>
> Steve
>
> On 7 Jan 2011, at 09:02, Martin Petrov wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > Looking at my logs I see that if my application is not used for 1 hour
> > its state is changed from up to down. Next time a request comes it
> > takes several seconds to start again.
>
> > Does requesting an http cached page keeps the application alive? My
> > app has only one page, which is http cached.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Heroku" group.
> > To post to this group, send email to her...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > heroku+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/heroku?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@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.



Re: 1 hour inactivity idling and http caching

2011-01-07 Thread Steve Smith
I'm not an expert on this so I would double check, however I think this is all 
the case,

If you only have one dyno then the app will shutdown when there are no requests 
for a certain time period. I believe this isn't the case once you have more 
than one dyno but in my experience at that point you have enough concurrent 
connections to keep things alive anyway.

If you are caching the page it will be stored in varnish so the request will 
never be handed out to the app and will therefore allow the app to shutdown.

Steve


On 7 Jan 2011, at 09:02, Martin Petrov wrote:

> Hi,
> 
> Looking at my logs I see that if my application is not used for 1 hour
> its state is changed from up to down. Next time a request comes it
> takes several seconds to start again.
> 
> Does requesting an http cached page keeps the application alive? My
> app has only one page, which is http cached.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Heroku" group.
> To post to this group, send email to her...@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.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@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.



1 hour inactivity idling and http caching

2011-01-07 Thread Martin Petrov
Hi,

Looking at my logs I see that if my application is not used for 1 hour
its state is changed from up to down. Next time a request comes it
takes several seconds to start again.

Does requesting an http cached page keeps the application alive? My
app has only one page, which is http cached.

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@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.