Rails 4 Asset Pipeline in Development

18 views
Skip to first unread message

mikej

unread,
Jul 3, 2017, 11:39:01 AM7/3/17
to Ruby on Rails: Talk
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,

Mike

Hassan Schroeder

unread,
Jul 3, 2017, 8:23:22 PM7/3/17
to rubyonrails-talk
On Mon, Jul 3, 2017 at 8:39 AM, mikej <mikeje...@gmail.com> wrote:
> ...Every time I change some js I need to go through the timeouts again.

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

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

mikej

unread,
Jul 4, 2017, 4:31:47 AM7/4/17
to Ruby on Rails: Talk
Thanks for the reply.  I'm not using brunch.  Just the default set up.  Sprockets.


Hassan Schroeder

unread,
Jul 4, 2017, 9:42:43 AM7/4/17
to rubyonrails-talk
On Tue, Jul 4, 2017 at 1:31 AM, mikej <mikeje...@gmail.com> wrote:
> 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.

HTH,

mikej

unread,
Jul 4, 2017, 10:35:12 AM7/4/17
to Ruby on Rails: Talk
The log stops at the line above where application.js is included.  I'll have a look at NewRelic.  Thanks.
Reply all
Reply to author
Forward
0 new messages