I have a bizarre issue with my Rails 4.1.4 app running on multiple Puma instances. The app has an API that is hit by other systems in an SOA architecture. We have a high-traffic system and it receives many calls. If, when starting the app, we have clients calling one of our endpoints (called track), then it seems like some of the Puma workers don't load classes into memory properly and we start getting errors like:
FATAL -- :
AbstractController::ActionNotFound (The action 'track' could not be found for ArticlesController):
vendor/bundle/ruby/1.9.1/gems/actionpack-4.1.4/lib/abstract_controller/base.rb:131:in `process'
vendor/bundle/ruby/1.9.1/gems/actionview-4.1.4/lib/action_view/rendering.rb:30:in `process'
and...
FATAL -- :
AbstractController::ActionNotFound (The action 'find' could not be found for MatchesController):
vendor/bundle/ruby/1.9.1/gems/actionpack-4.1.4/lib/abstract_controller/base.rb:131:in `process'
vendor/bundle/ruby/1.9.1/gems/actionview-4.1.4/lib/action_view/rendering.rb:30:in `process'
Note that the track event is only on the ArticlesController, but something is happening to where it can't make requests against any controller once we get into this situation.
If I disable calls to the track endpoint from the clients and I bounce my app, everything works fine. If I wait until the system comes up and turn on the track calls again, then everything is still fine.
The problem only occurs when the track calls are being made during app boot time.
I don't know what info to provide to help diagnose this problem. I'll add more details to the question if anybody has a hunch on how to approach debugging this.