Rails 4 Asset Pipeline in Development

I am having intermittent problems with 504 Gateway Time-out in development. This has just started happening after no changes to my application that I can think of. If I keep refreshing the page it renders eventually in less than 1 second after 2 or 3 504 Gateway Time-out errors. Every time I change some js I need to go through the timeouts again. I sometimes see the application.js causing the 504 error in the js console.

I have tried changing these setting is config/environment/development.rb:

config.action_controller.perform_caching = true

config.assets.debug = false

It seems this is a bigger problem. Any suggestions much appreciated,


WAG: Are you using something like brunch to auto-build your JS?

Thanks for the reply. I’m not using brunch. Just the default set up. Sprockets.

"Every time I change some js I need to go through the timeouts again."

That certainly sounds like some asset compilation is going on (slowly!).
What is in the Rails log when you're making these requests?

If nothing significant appears there, I'd install NewRelic.


The log stops at the line above where application.js is included. I’ll have a look at NewRelic. Thanks.