Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many open files #1759

Closed
renspr opened this issue Jan 31, 2015 · 5 comments

Comments

@renspr
Copy link

@renspr renspr commented Jan 31, 2015

Hi,

I have a migration that moves a user profile picture (originally uploaded by carrierwave) into a new user model. When running the migration I'll get a "Too many open files" error after ~2000 records.

The user looks like this

class User < ActiveRecord::Base
  # ...

  # Attachments
  has_attached_file :photo,
    styles: { original: "300x300>", thumb: "100x100>" },
    convert_options: { all: '-auto-orient' }
  validates_attachment :photo,
    presence: true,
    content_type: { content_type: ["image/jpeg", "image/png"] },
    size: { in: 0..1.megabytes }

  # ...
end

Migration

# ...
def up
    User.transaction do
      add_attachment :users, :photo

      # ...

      Profile.find_each do |profile|
        old_photo_path = "#{Rails.root}/public/uploads/profile/photo/#{profile.id}/cropped_#{profile.photo}"
        old_photo_file = File.open(old_photo_path)

        user = User.find(profile.user_id)
        user.photo = old_photo_file
        old_photo_file.close
        user.save!(validate: false)
      end
    end
  end

The stacktrace

Too many open files - file -b --mime '/var/folders/04/1w0ww06n349268r2hzztmfhm0000gn/T/5c8f0509e04f55507a03c86beb22cfbe20150131-73323-43bmjw20150131-73323-6bqono'/Users/renspr/.rvm/gems/ruby-2.2.0/gems/cocaine-0.5.5/lib/cocaine/command_line/runners/process_runner.rb:32:in `spawn'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/cocaine-0.5.5/lib/cocaine/command_line/runners/process_runner.rb:32:in `spawn'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/cocaine-0.5.5/lib/cocaine/command_line/runners/process_runner.rb:21:in `call'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/cocaine-0.5.5/lib/cocaine/command_line.rb:136:in `execute'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/cocaine-0.5.5/lib/cocaine/command_line.rb:75:in `run'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/helpers.rb:31:in `run'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/file_command_content_type_detector.rb:18:in `type_from_file_command'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/file_command_content_type_detector.rb:10:in `detect'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/content_type_detector.rb:61:in `type_from_file_command'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/content_type_detector.rb:36:in `detect'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/io_adapters/file_adapter.rb:14:in `cache_current_values'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/io_adapters/file_adapter.rb:5:in `initialize'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/io_adapters/registry.rb:29:in `new'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/io_adapters/registry.rb:29:in `for'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:528:in `post_process_style'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:512:in `block in post_process_styles'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:511:in `each'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:511:in `post_process_styles'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:503:in `block (2 levels) in post_process'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:117:in `call'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:117:in `call'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:151:in `call'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:151:in `block in halting_and_conditional'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `call'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `_run_callbacks'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_photo_post_process_callbacks'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/callbacks.rb:36:in `run_paperclip_callbacks'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:501:in `block in post_process'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `call'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `_run_callbacks'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_post_process_callbacks'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/callbacks.rb:36:in `run_paperclip_callbacks'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:500:in `post_process'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:456:in `post_process_file'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:108:in `assign'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/has_attached_file.rb:66:in `block in define_setter'
/Users/renspr/Code/Projects/tickettoaster/crewtool/db/migrate/20150129150327_merge_user_profile_into_user.rb:20:in `block (2 levels) in up'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/relation/delegation.rb:46:in `each'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/relation/delegation.rb:46:in `each'
/Users/renspr/Code/Projects/tickettoaster/crewtool/db/migrate/20150129150327_merge_user_profile_into_user.rb:15:in `block in up'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:220:in `transaction'
/Users/renspr/Code/Projects/tickettoaster/crewtool/db/migrate/20150129150327_merge_user_profile_into_user.rb:7:in `up'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:609:in `exec_migration'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:590:in `block (2 levels) in migrate'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:589:in `block in migrate'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:588:in `migrate'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:765:in `migrate'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:995:in `block in execute_migration_in_transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:1041:in `block in ddl_transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:220:in `transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:1041:in `ddl_transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:994:in `execute_migration_in_transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:956:in `block in migrate'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:952:in `each'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:952:in `migrate'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:820:in `up'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:798:in `migrate'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
/Users/renspr/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
/Users/renspr/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
Errno::EMFILE: Too many open files - file -b --mime '/var/folders/04/1w0ww06n349268r2hzztmfhm0000gn/T/5c8f0509e04f55507a03c86beb22cfbe20150131-73323-43bmjw20150131-73323-6bqono'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/cocaine-0.5.5/lib/cocaine/command_line/runners/process_runner.rb:32:in `spawn'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/cocaine-0.5.5/lib/cocaine/command_line/runners/process_runner.rb:32:in `spawn'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/cocaine-0.5.5/lib/cocaine/command_line/runners/process_runner.rb:21:in `call'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/cocaine-0.5.5/lib/cocaine/command_line.rb:136:in `execute'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/cocaine-0.5.5/lib/cocaine/command_line.rb:75:in `run'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/helpers.rb:31:in `run'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/file_command_content_type_detector.rb:18:in `type_from_file_command'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/file_command_content_type_detector.rb:10:in `detect'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/content_type_detector.rb:61:in `type_from_file_command'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/content_type_detector.rb:36:in `detect'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/io_adapters/file_adapter.rb:14:in `cache_current_values'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/io_adapters/file_adapter.rb:5:in `initialize'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/io_adapters/registry.rb:29:in `new'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/io_adapters/registry.rb:29:in `for'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:528:in `post_process_style'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:512:in `block in post_process_styles'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:511:in `each'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:511:in `post_process_styles'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:503:in `block (2 levels) in post_process'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:117:in `call'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:117:in `call'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:151:in `call'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:151:in `block in halting_and_conditional'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `call'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `_run_callbacks'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_photo_post_process_callbacks'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/callbacks.rb:36:in `run_paperclip_callbacks'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:501:in `block in post_process'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `call'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `_run_callbacks'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_post_process_callbacks'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/callbacks.rb:36:in `run_paperclip_callbacks'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:500:in `post_process'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:456:in `post_process_file'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:108:in `assign'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/paperclip-4.2.1/lib/paperclip/has_attached_file.rb:66:in `block in define_setter'
/Users/renspr/Code/Projects/tickettoaster/crewtool/db/migrate/20150129150327_merge_user_profile_into_user.rb:20:in `block (2 levels) in up'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/relation/delegation.rb:46:in `each'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/relation/delegation.rb:46:in `each'
/Users/renspr/Code/Projects/tickettoaster/crewtool/db/migrate/20150129150327_merge_user_profile_into_user.rb:15:in `block in up'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:220:in `transaction'
/Users/renspr/Code/Projects/tickettoaster/crewtool/db/migrate/20150129150327_merge_user_profile_into_user.rb:7:in `up'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:609:in `exec_migration'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:590:in `block (2 levels) in migrate'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:589:in `block in migrate'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:588:in `migrate'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:765:in `migrate'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:995:in `block in execute_migration_in_transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:1041:in `block in ddl_transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:220:in `transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:1041:in `ddl_transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:994:in `execute_migration_in_transaction'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:956:in `block in migrate'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:952:in `each'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:952:in `migrate'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:820:in `up'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:798:in `migrate'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/Users/renspr/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
/Users/renspr/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
/Users/renspr/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

I'm unsure if this is a bug or if I'm doing something wrong. Closing the file right after assigning it to the attachment does't solve this issue though.

Regards, René

@adrianotadao

This comment has been minimized.

Copy link

@adrianotadao adrianotadao commented Feb 3, 2015

@renspr This is a file system alert. Check this post and raise the unlimit

@renspr

This comment has been minimized.

Copy link
Author

@renspr renspr commented Feb 4, 2015

After raising ulimit for open files the process finished successfully.

@renspr renspr closed this Feb 4, 2015
@glaucocustodio

This comment has been minimized.

Copy link

@glaucocustodio glaucocustodio commented Aug 13, 2015

Same problem here, increasing ulimit works, but would be great to find the real cause..

@tute

This comment has been minimized.

Copy link
Contributor

@tute tute commented Sep 9, 2015

There is more discussion in: #1326

@barbolo

This comment has been minimized.

Copy link

@barbolo barbolo commented Feb 14, 2017

Raising ulimit is not the way to go, it will mask the real problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.