tra / spawnling

spawn gem for Rails to easily fork or thread long-running code blocks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't allocate memory

avitus opened this issue · comments

commented

We seeing a lot of the following types of errors:

Errno::ENOMEM: Cannot allocate memory - fork(2)

[GEM_ROOT]/bundler/gems/spawn-beaf7937cae9/lib/spawn.rb:165:in fork' [GEM_ROOT]/bundler/gems/spawn-beaf7937cae9/lib/spawn.rb:165:infork_it'
[GEM_ROOT]/bundler/gems/spawn-beaf7937cae9/lib/spawn.rb:130:in `spawn_block'

They are occurring even though at the time 50% of our 4GB RAM is being utilized. Our environment is Ruby 1.9.2, Rails 3.1.1, Nginx 1.0.6 and Passenger 3.0.6.

commented

We upgraded Passenger to 3.0.11 and Nginx to 1.0.10. We also set Passenger's spawn method to 'conservative' and the problem still seems to persist. It's odd because we've been using the spawn gem for over two years and have never had a problem with prior versions of Rails.

I've never used it with Ruby 1.9.x because of the name collision. That will change at some point (when I'm less lazy).

Closing to clean up as this in an old issue, if this is still valid on the latest version of spawnling then please re-open the issue and I will address it.