Skip to content

Commit

Permalink
Try this one trick to remove seg faults
Browse files Browse the repository at this point in the history
Using Sassc and Sprockets seems somewhat prone to segmentation faults
which seems to be a common issue with Sprockets 4. As per
rails/sprockets#633 and
sass/sassc-ruby#207, switching concurrent
asset generation seems to resolve the problem. The unproven theory is
that this reflects that Sprockets 4 uses threads which causes problems
for sassc.

A consequence of this is that asset pre-compilation may be slower than
it could be.
  • Loading branch information
kevindew committed Mar 21, 2022
1 parent b872036 commit 1b4271d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/initializers/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@
#{__dir__}/../../node_modules/govuk-frontend/
#{__dir__}/../../node_modules/
]

Rails.application.config.assets.configure do |env|
env.export_concurrent = false
end

0 comments on commit 1b4271d

Please sign in to comment.