Re: postgres tuning
Sure. We've got a big, ugly database that we are constantly slamming data into (nearly constant appends on one table, with occasionally purges.) We'd like to increase the checkpoint segments to see if that boosts write performance. On the cache side, according to this website: http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server "Setting effective_cache_size to 1/2 of total memory would be a normal conservative setting, and 3/4 of memory is a more aggressive but still reasonable amount." Again, as near as I can tell, the default in Heroku is to set it to 200MB. We are running a ronin database, which should have 1.7 Gigs of RAM, giving 850MB to 1.3 GB of cache as the ideal, at least according to that wiki entry. Our goal is to extract maximum performance with minimum effort and bug creation and, therefore, tweaking some postgres parameters would be an ideal way to do so. Let me know if you need any more details on our use case. Thanks! Carson On Jan 7, 12:40 pm, Matthew Soldo wrote: > Hi Carson, > > We don't support tuning the dedicated database. > > I'd love to hear more about your requirements and needs around this. It's > possible that this could be supported in the future. > > Matt > > > > On Fri, Jan 7, 2011 at 10:50 AM, Carson Gross wrote: > > Is it possible to tune a dedicated postgres database? In particular, > > we'd like to change the effective cache size and checkpoint segments > > setting from the defaults (appear to be ~200MB and 40, respectively.) > > > Cheers, > > Carson > > > -- > > 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: postgres tuning
Hi Carson, We don't support tuning the dedicated database. I'd love to hear more about your requirements and needs around this. It's possible that this could be supported in the future. Matt On Fri, Jan 7, 2011 at 10:50 AM, Carson Gross wrote: > Is it possible to tune a dedicated postgres database? In particular, > we'd like to change the effective cache size and checkpoint segments > setting from the defaults (appear to be ~200MB and 40, respectively.) > > Cheers, > Carson > > -- > 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: app fails to do job, when I don't change then save applicationController
@kerri - Thanks for your advice, I'll give restart a try if I don't find a stable solution. @Gabriel - " there's no need for most > of the code you've written so far to be in ApplicationController " I see now, you're absolutely right, it was just my first attempt at putting something together, and lots of controllers were using the code so I stuck it in App controller so everything could see it. I've got it a bit better organised now, it's within the class 'EventSearcher' which all then gets put on a queue to be done as a background job using the delayed_job gem, and I hope that's a better place for it. "you're running in > development mode locally. This generally means that all of your > ApplicationController code is reloaded on every request" I can see how this might cause a different behaviour between local app, and heroku app, I have not made any specifications as to which mode either the local or the heroku app is running in. Is the heroku app automatically set as production mode when I upload it? Would you recommend switching to production mode locally to test the app before uploading it? Having moved all the scraping functions to 'EventSearcher' I've discovered it's specifically one function, the one that opens and parses the html doc that needs a small change to be made before the heroku app works. I'd try and debug this when it doesn't work, but i cant get a print out of 'logger.debug' statements on the heroku logs, is it possible put in debug statements, and then look at them in the heroku logs?? Thanks for all your help! Mike -- 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
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.
postgres tuning
Is it possible to tune a dedicated postgres database? In particular, we'd like to change the effective cache size and checkpoint segments setting from the defaults (appear to be ~200MB and 40, respectively.) Cheers, Carson -- 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
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
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
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
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
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.
Can Redis2Go replace memcahe?
Hey The price difference for 100mb Redis or Memcache is only $5 I may have it wrong, but thought Redis provides very similar functionality, with extra useful functionality Why or when would someone chose Memcache over Redis? Redis is promoted as a way to store sessions, so I assume it is blazingly fast, particularly being memory based? cheers -- 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
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
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.