I’ve got a rather large, 2.3 upgraded to Rails 3 application, that’s fat enough it’s not making it through the 60 second startup door at Heroku, and therefore it’s crashing. I’ve done a bunch of work to minimize load times within Gems and initializers, but there’s some random process that’s burning time and I’m not exactly sure what it is. I could use another set of eyes.
Here’s a GIST with the config.ru, application.rb, and environment.rb and the Gemfile.
https://gist.github.com/2026140
Any thoughts would be greatly appreciated.
This was due, at least in my case, to two things: 1) a lot of gems, and 2) Mongo taking a long time to initialize (big burdened database).
To fix the gems, on my local dev, I patched bundler Kernel#require statement so I could see which were taking the longest to load. Then, I tried to remove them. Barring that, I set them to :require => false and manually required them where they were needed.
Secondly, I monkey patched Mongoid so that it doesn’t try to connect to the database when the app is starting. This helped dramatically with the slow boot time (removed over 10 seconds).