Skip to content

Commit

Permalink
except ConnectionResetError in MultiProcessingHandler (#770)
Browse files Browse the repository at this point in the history
* except ConnectionResetError in MultiProcessingHandler

* formatting

* add changelog entry

* Update cluster_tools/Changelog.md

Co-authored-by: Philipp Otto <[email protected]>

* adapt comment

Co-authored-by: Philipp Otto <[email protected]>
  • Loading branch information
jstriebel and philippotto authored Jul 22, 2022
1 parent 21b9eaf commit db7c5f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions cluster_tools/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ For upgrade instructions, please check the respective *Breaking Changes* section
### Changed

### Fixed
- Suppress spurious ConnectionResetErrors when using multiprocessing. [#770](https://github.com/scalableminds/webknossos-libs/pull/770)


## [0.10.9](https://github.com/scalableminds/webknossos-libs/releases/tag/v0.10.9) - 2022-07-21
Expand Down
10 changes: 8 additions & 2 deletions cluster_tools/cluster_tools/multiprocessing_logging_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,15 @@ def _receive(self) -> None:
self.wrapped_handler.emit(record)
except (KeyboardInterrupt, SystemExit): # pylint: disable=try-except-raise
raise
# multiprocessing.managers.RemoteError pop up quite often.
# The following errors pop up quite often.
# It seems that they can be safely ignored, though.
except (BrokenPipeError, EOFError, multiprocessing.managers.RemoteError):
# The reason for those might be that the sending end was closed.
except (
BrokenPipeError,
EOFError,
ConnectionResetError,
multiprocessing.managers.RemoteError,
):
break
except QueueEmpty:
# This case is reached when the timeout in queue.get is hit. Pass, to
Expand Down

0 comments on commit db7c5f0

Please sign in to comment.