Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logging chokes on BlockingIOError: write could not complete without blocking

I recently ported my scripts from 2.x to 3.x. During production runs through automation (rundeck) we are seeing errors caused by the logger not handling blocking I/O. Any ideas how to resolve would be great.

  • Ubuntu 18.04.1 LTS
  • Python 3.6.7
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.6/logging/__init__.py", line 998, in emit
    self.flush()
  File "/usr/lib/python3.6/logging/__init__.py", line 978, in flush
    self.stream.flush()
BlockingIOError: [Errno 11] write could not complete without blocking
like image 665
Slawomir Avatar asked Jan 14 '19 16:01

Slawomir


1 Answers

I was getting the same error on CI builds. It looks like it was a capacity issue with the output stream. After reducing the log output, the errors went away.

like image 132
Fabian Avatar answered Sep 18 '22 10:09

Fabian