Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pg.rb segmentation fault [Mojave upgrade]

Segmentation fault in pg.rb:56

versions: rails: 5.2.0, ruby: 2.4.4, pg gem: 0.20.0

After upgrading to Mac OS mojave i have encountered problems with my local host server. The server itself, starts fine, however when trying to access it through a web browser, it crashes and I have the segmentation error shown above.

like image 883
k.jobbins Avatar asked Oct 29 '18 13:10

k.jobbins


2 Answers

As this issue is only occuring in the development environment, I made it conditional. This solution in puma.rb works for me until the bug gets fixed.

workers ENV.fetch("WEB_CONCURRENCY") { 2 } unless Rails.env.development?

like image 143
Steven Avatar answered Nov 15 '22 20:11

Steven


in .env file set WEB_CONCURRENCY=0 and you do not need to add any logic in config/puma.rb

like image 39
Dimka Pron Avatar answered Nov 15 '22 20:11

Dimka Pron