Skip to content

Cannot allocate memory - grepΒ #206

@leoluchini

Description

@leoluchini

Hi,

I'm doing a ruby migration (3.0.5) in the current system and when I run the specs I got an error. This call is inside a service and is called many times and couldn't find the explanation for this error

Failure/Error: @image_optim ||= ImageOptim.new(image_optim_config)
Errno::ENOMEM:
Cannot allocate memory - grep
# /usr/local/bundle/gems/image_optim-0.31.3/lib/image_optim/cmd.rb:44:in ``'
# /usr/local/bundle/gems/image_optim-0.31.3/lib/image_optim/cmd.rb:44:in `capture'
# /usr/local/bundle/gems/image_optim-0.31.3/lib/image_optim/config.rb:220:in `processor_count'
# /usr/local/bundle/gems/image_optim-0.31.3/lib/image_optim/config.rb:120:in `threads'
# /usr/local/bundle/gems/image_optim-0.31.3/lib/image_optim.rb:88:in `block in initialize'
# /usr/local/bundle/gems/image_optim-0.31.3/lib/image_optim.rb:87:in `each'
# /usr/local/bundle/gems/image_optim-0.31.3/lib/image_optim.rb:87:in `initialize'

This is the image_optim_config

{
  :skip_missing_workers=>true,
  :nice=>10,
  :advpng=>false,
  :gifsicle=>false,
  :jhead=>false,
  :jpegoptim=>false,
  :allow_lossy=>true,
  :oxipng=>false, 
  :jpegrecompress=>false, 
  :jpegtran=>{
    :copy_chunks=>false, 
    :progressive=>true, 
    :jpegrescan=>false
  }, 
  :optipng=>false, 
  :pngcrush=>false, 
  :pngout=>false, 
  :pngquant=>false, 
  :svgo=>false
}

I'm using version 0.31.3 for image_optim

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions