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

Errno::EPIPE: Broken pipe @ io_write - <STDERR> #3188

Closed
vitobotta opened this issue Oct 12, 2016 · 7 comments
Closed

Errno::EPIPE: Broken pipe @ io_write - <STDERR> #3188

vitobotta opened this issue Oct 12, 2016 · 7 comments

Comments

@vitobotta
Copy link

Ruby version: 2.3.1p112
Sidekiq / Pro / Enterprise version(s): 4.2.2

Hi, I am getting the error in the subject on a new server with Redis 3.0.6. Weird thing is that if I restart Sidekiq some jobs get processed but then again the same error with new jobs. Any idea?

Thanks!

@mperham
Copy link
Collaborator

mperham commented Oct 12, 2016

You're demonizing the process incorrectly such that the standard streams are not set up correctly. This causes the process to die when it tries to write to the stream.

On Oct 12, 2016, at 7:23 AM, Vito Botta notifications@github.com wrote:

Ruby version: 2.3.1p112
Sidekiq / Pro / Enterprise version(s): 4.2.2

Hi, I am getting the error in the subject on a new server with Redis 3.0.6. Weird thing is that if I restart Sidekiq some jobs get processed but then again the same error with new jobs. Any idea?

Thanks!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@vitobotta
Copy link
Author

Hi Mike,

I'm using Monit with the following config:

check process hatuko_production_sidekiq
    with pidfile /home/deploy/apps/hatuko_production/current/tmp/pids/sidekiq.pid
  start program = "/bin/su - deploy -c 'cd /home/deploy/apps/hatuko_production/current/ && bundle exec sidekiq -e production -C config/sidekiq.yml'"
  stop program = "/bin/su - deploy -c 'kill -QUIT `cat /home/deploy/apps/hatuko_production/shared/tmp/pids/sidekiq.pid`'"

I checked https://github.com/mperham/sidekiq/wiki/Deployment but I am not sure of what I am doing incorrectly. I have used the same Monit config in the recent past with another app and it was working.

Thanks

@vitobotta
Copy link
Author

Sorry, it was a logging problem, not related to Sidekiq. I had left the rails12factor gem in the Gemfile after a migration away from Heroku and this was causing logging issues. The broken pipe error was due to this. Thank you for your help :)

@siva3395
Copy link

@vitobotta May i know how you fixed the issue? Issue with Error logging?

@vitobotta
Copy link
Author

Hi @siva3395 , sorry for the delay. In my case as said I had left the raiuls12factor gem which I had needed for Heroku. Among other things, this gem changes things in Rails so that logging is redirected to STDOUT instead of file as per defaults. With this configuration I was getting an error in Sidekiq, but IIRC just removing that gem fixed it. Have you solved in the meantime?

@adamnoto
Copy link

hi yeah this is not sidekiq issue, just ensure log written out is written through sidekiq logger.

@aman199002
Copy link

I am still getting this error intermittently. My sidekiq worker is trying to write some log and getting WARN: Errno::EPIPE: Broken pipe @ io_write - <STDERR>.
In backtrace i can find its happening while running this command Kernel.warn("Roadie: #{message}") when using some utility in roadie gem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants