3

I'm getting the below error when trying to run migrations locally. But it only happens sometimes, so I'm trying to understand what might cause it.

Full error:

rake aborted!
PG::ConnectionBad: could not fork new process for connection: Resource temporarily unavailable
could not fork new process for connection: Resource temporarily unavailable
E, [2017-04-22T10:09:26.381554 #17026] ERROR -- : fsevent: running worker failed: Resource temporarily unavailable

Otherwise, the rails console, and accessing the db directly through a client works fine.

I was pointed to another thread which recommended checking,

ulimit -Hn

unlimited

So my descriptor limit doesn't appear to be the issue.

Source: fork: retry: Resource temporarily unavailable

Update:

It consistently fails when the rails server (Puma) is running, but works when its not.

Community
  • 1
  • 1
tim_xyz
  • 11,573
  • 17
  • 52
  • 97
  • Can you post the memory conception, while rails app is running and when it is not? Fork takes up memory as its creating a new process. It could be possible that your code is failing because it doesn't have enough RAM. – coderhs Apr 22 '17 at 17:53

0 Answers0