Due to my site having low volume, heroku spins down/idles my dyno. So, when the first request comes in I get a 500 Internal Server Error. Then, when I refresh, the app comes up as expected.
Has anyone experienced this and could help with a solution? The interesting line in the log output is 2012-06-28T04:18:31+00:00 app[web.1]: Permission denied - /app/public/stylesheets/admin/assets.css Thanks, Jason Here is my log when this happens 2012-06-28T03:42:45+00:00 heroku[web.1]: Unidling 2012-06-28T03:42:45+00:00 heroku[web.1]: State changed from down to starting 2012-06-28T03:42:50+00:00 heroku[web.1]: Starting process with command `thin -p 52699 -e staging -R /home/heroku_rack/heroku.ru start` 2012-06-28T03:42:57+00:00 app[web.1]: There is no support for CoffeeScript 2012-06-28T03:42:58+00:00 app[web.1]: [Clipped] Using image thumbnailer: ImageMagick 6.6.0-4 2010-06-01 Q16 http://www.imagemagick.org 2012-06-28T03:42:59+00:00 app[web.1]: >> Thin web server (v1.2.6 codename Crazy Delicious) 2012-06-28T03:42:59+00:00 app[web.1]: >> Listening on 0.0.0.0:52699, CTRL+C to stop 2012-06-28T03:42:59+00:00 app[web.1]: >> Maximum connections set to 1024 2012-06-28T03:43:00+00:00 heroku[web.1]: State changed from starting to up 2012-06-28T03:43:03+00:00 heroku[router]: GET pisr-staging.heroku.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=9ms status=200 bytes=0 2012-06-28T04:18:31+00:00 heroku[router]: GET pisr-staging.heroku.com/cleanple-home/ dyno=web.1 queue=0 wait=0ms service=1746ms status=500 bytes=309 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/sass-3.1.19/rails/../lib/sass/../sass/plugin/compiler.rb:356:in `initialize' 2012-06-28T04:18:31+00:00 app[web.1]: /!\ FAILSAFE /!\ Wed Jun 27 21:18:31 -0700 2012 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/sass-3.1.19/rails/../lib/sass/../sass/plugin/compiler.rb:356:in `open' 2012-06-28T04:18:31+00:00 app[web.1]: Permission denied - /app/public/stylesheets/admin/assets.css 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/sass-3.1.19/rails/../lib/sass/../sass/plugin/compiler.rb:356:in `write_file' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/sass-3.1.19/rails/../lib/sass/../sass/plugin/compiler.rb:349:in `update_stylesheet' 2012-06-28T04:18:31+00:00 app[web.1]: Status: 500 Internal Server Error 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/sass-3.1.19/rails/../lib/sass/../sass/plugin/compiler.rb:202:in `update_stylesheets' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/sass-3.1.19/rails/../lib/sass/../sass/plugin/compiler.rb:200:in `each' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/sass-3.1.19/rails/../lib/sass/../sass/plugin.rb:81:in `update_stylesheets' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/sass-3.1.19/rails/../lib/sass/../sass/plugin/rack.rb:51:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/sass-3.1.19/rails/../lib/sass/../sass/plugin/compiler.rb:200:in `update_stylesheets' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/sass-3.1.19/rails/../lib/sass/../sass/plugin.rb:54:in `check_for_updates' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/rack-cache-1.0.3/lib/rack/cache/context.rb:132:in `forward' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/rack-cache-1.0.3/lib/rack/cache/context.rb:243:in `fetch' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/rack-cache-1.0.3/lib/rack/cache/context.rb:181:in `lookup' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/rack-cache-1.0.3/lib/rack/cache/context.rb:65:in `call!' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/rack-cache-1.0.3/lib/rack/cache/context.rb:50:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/string_coercion.rb:25:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/rack-1.1.3/lib/rack/head.rb:9:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/rack-1.1.3/lib/rack/methodoverride.rb:24:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/params_parser.rb:15:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/session/cookie_store.rb:99:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/failsafe.rb:26:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/rack-1.1.3/lib/rack/lock.rb:11:in `synchronize' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/rack-1.1.3/lib/rack/lock.rb:11:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/rack-1.1.3/lib/rack/lock.rb:11:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:106:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:74:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /home/heroku_rack/lib/last_access.rb:15:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /home/heroku_rack/lib/static_assets.rb:9:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/rack-1.1.3/lib/rack/urlmap.rb:47:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/rack-1.1.3/lib/rack/urlmap.rb:41:in `each' 2012-06-28T04:18:31+00:00 app[web.1]: /home/heroku_rack/lib/date_header.rb:14:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/rack-1.1.3/lib/rack/urlmap.rb:41:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/rack-1.1.3/lib/rack/builder.rb:77:in `call' 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/connection.rb:76:in `pre_process' 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/connection.rb:74:in `catch' 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/connection.rb:74:in `pre_process' 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/connection.rb:42:in `receive_data' 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/connection.rb:57:in `process' 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine' 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run' 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/backends/base.rb:57:in `start' 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/server.rb:156:in `start' 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/controllers/controller.rb:80:in `start' 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/runner.rb:177:in `send' 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/runner.rb:177:in `run_command' 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/runner.rb:143:in `run!' 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/bin/thin:6 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/bin/thin:19:in `load' 2012-06-28T04:18:31+00:00 app[web.1]: /usr/ruby1.8.7/bin/thin:19
