diff --git a/src/opserver/partition_handler.py b/src/opserver/partition_handler.py index 0a95887a8de..13f19cd4de7 100644 --- a/src/opserver/partition_handler.py +++ b/src/opserver/partition_handler.py @@ -18,6 +18,7 @@ from pysandesh.util import UTCTimestampUsec import select import redis +import errno from collections import namedtuple PartInfo = namedtuple("PartInfo",["ip_address","instance_id","acq_time","port"]) @@ -637,6 +638,10 @@ def _run(self): self.stop_partition() self._failed = True pause = True + if hasattr(ex,'errno'): + # This is an unrecoverable error + if ex.errno == errno.EMFILE: + raise SystemExit(1) self._logger.error("Stopping %s pcount %d" % (self._topic, pcount)) partdb = self.stop_partition()