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
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.
The workers could be still running in the background but no longer have the access to STDOUT.
I.e. Those workers still keep processing jobs but when it comes to print, they complain about the EIO.
(In my case, it was caused by killing the tmux server WITHOUT killing the workers. Do a ps -ef | grep resque
and there they are.)
Solution:
Kill those workers and start new ones.
e.g. pkill resque-1.25.2
(Or whatever the workers' name)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With