Hi Jim,

Thank you for your response. I am now using Unicorn for a webserver and 
cleaned up the radius code for the template by removing all multi-purpose 
conditionals and simply focusing the template on one task: pulling the 
pages and page parts. I have 200 pages to pull, each with corresponding 
four page parts for this page view, so I applied a pagination of 50 to try 
to achieve a reasonable result and it still takes 10-12 seconds average app 
response time on an uncached load, though occasionally longer, but at least 
the application errors have been reduced to about 7 per 24 hours for this 
view (among 58,562 events, not terrible, but zero application errors is my 
goal). The error is H12 "Request Timeout".

I included the template so you can see, but it's pretty much bar bones at 
this point. Calls in header/navigation, has a left-column/navigation, and a 
right column with the paginated page and page part pulls...

========================================================

<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> 
<![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>Attend | <r:title /></title>
  <r:meta:description tag="true" />
  <r:meta:keywords tag="true" />
  <link rel="stylesheet" href="/stylesheets/style.css">
  <link 
href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,400,600,400italic'
 
rel='stylesheet' type='text/css'>
  <script src="/javascripts/vendor/modernizr.min.js"></script>
</head>
<body id="default">
  <r:snippet name="header_default" />
  <div class="clearfix page_wrapper">
    <div id= "detail_left_container">
      <div class= "sidebar_container">
        <div class= "page_sidebar_container">
          <ul id="side_nav">
            <r:find path="/attend/">
              <r:children:each>
                <r:if_ancestor_or_self><li class="active"><r:link 
/></li></r:if_ancestor_or_self>
                <r:unless_ancestor_or_self><li><r:link 
/></li></r:unless_ancestor_or_self>
              </r:children:each>
            </r:find>
          </ul>
          <r:snippet name="search" />
                
        </div><!-- end page_sidebar_container -->
      </div><!-- end sidebar_container -->
    </div><!-- end detail_left_container -->


    <section id="detail_right_container" role=[main]> 
      <h1><r:title /></h1>
      <ul class="block-list presenters">
            <r:children:first>
                  <r:children:each paginated="true" per_page="50">
                   <!-- <li><h2><r:link /></h2></li> -->
                    <li>
                        <h2><r:link /></h2>
                        <div class="thumb">
                          <r:link>
                            <r:content part="image" />
                          </r:link>
                        </div>
                        <div class="info">
                          <r:content part="description" />
                          <div class="date-location"><r:content part="date" 
/><r:content part="location" /></div>
                        </div>
                    </li>
                  </r:children:each>
            </r:children:first>
      </ul>

      </section>

  </div><!-- end page_wrapper -->
  <r:snippet name="footer" />
</body>
</html>
========================================================

I would like to get the speed of this view much faster and completely error 
free. 

I did increase the cache time to an hour for now, though I can probably 
increase it further as suggested. I am a little confused how the caching 
with Radiant on Heroku since Heroku is a read-only file system. I feel like 
I should do some memory caching for these paginated pages (since I can't do 
file caching on Heroku?) Since I only want to cache this view (including 
it's 4 pagination pages) and maybe one other page I thought I might be able 
to use the existing memory and not have use Memcachier (which also didn't 
seem work with to Rails 2.3.18). What is the best way to handle caching for 
Radiant on Heroku?

Thank you for your time!

Zac







On Sunday, August 18, 2013 10:47:17 PM UTC-4, Jim Gay wrote:
>
> On Sat, Aug 17, 2013 at 4:36 PM, Zachary Linke 
> <zlin...@gmail.com<javascript:>> 
> wrote: 
> > I'm running Radiant 1.0.1 in Rails 2.3.18  on Heroku and it needs some 
> speed 
> > improvement / optimization. I'm using Thin for a webserver. 
> > 
> > My production.rb looks like this... 
> > 
> > # Settings specified here will take precedence over those in 
> > config/environment.rb 
> > 
> > # The production environment is meant for finished, "live" apps. 
> > # Code is not reloaded between requests 
> > config.cache_classes = true 
> > 
> > # Use a different logger for distributed setups 
> > # config.logger        = SyslogLogger.new 
> > 
> > 
> > # Full error reports are disabled and caching is on 
> > config.action_controller.consider_all_requests_local = false 
> > config.action_controller.perform_caching             = true 
> > 
> > # Enable serving of images, stylesheets, and javascripts from an asset 
> > server 
> > # config.action_controller.asset_host                  = 
> > "http://assets.example.com"; 
> > 
> > # Disable delivery errors if you bad email addresses should just be 
> ignored 
> > # config.action_mailer.raise_delivery_errors = false 
> > 
> > # Cache your content for a longer time, the default is 5.minutes 
> > config.after_initialize do 
> >   Radiant::Config['site.url'] = 'mywebsite.com' 
> >   SiteController.cache_timeout = 1.seconds 
> > end 
> > 
> > 
> > The biggest problem is when I try to show a list of 100 pages on the 
> site 
> > and it results in a time out and application error almost every time. 
> > 
> > Do I need to increase the site controller cache to a longer time? Do I 
> need 
> > to implement a different caching to work with Heroku?  Do I need to 
>  switch 
> > to a different webserver like Unicorn or Puma? 
> > 
> > 
> > Any help would be appreciated.... 
> > 
> > Thanks! 
> > 
> > Zac 
> > 
>
> Why do you have "SiteController.cache_timeout = 1.seconds" ? 
> That essentially means that you are doing no caching. 
> So, yes, I'd increase that if you can. How often is the site updated? 
> Can you make it 7.days or 12.hours or something like that? 
>
> There also may be some things that you're doing with your Radius code 
> in rendering the page that could be more efficient. 
>
> Can you tell us what the error is from your logs? 
>
>
>
> -- 
> Write intention revealing code #=> http://www.clean-ruby.com 
>
> Jim Gay 
> Saturn Flyer LLC 
> 571-403-0338 
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Radiant CMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to radiantcms+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to