Errno::EIO: Input/output error - <STDOUT>

Dipak Panchal picture Dipak Panchal · May 23, 2014 · Viewed 12.6k times · Source
class FaxFetchWorker
  include Sidekiq::Worker
  sidekiq_options :retry => false

  def perform(job_id=0)
    logger.warn "perform is invoked."

    FaxSource.all.each do |source|
      ...
    end
  end
end

Getting Error Errno::EIO: Input/output error - <STDOUT> on Line # 6

Answer

media-slave24 picture media-slave24 · May 23, 2014

The #6 line in your code is this

    logger.warn "perform is invoked."

This code needs opened STDOUT stream and your error name is Errno::EIO.

In linux EIO means, that there was made an attempt to read/write to stream which is currently unavailable. This could happen because of physical error or when orphaned process (whose parent has died) attempts to get stdio from parent process, or when stream is closed.