Alon Bar-Lev has uploaded a new change for review. Change subject: packaging: services: extend important limits to their hard limit ......................................................................
packaging: services: extend important limits to their hard limit Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1057654 Change-Id: Ib9f89a1519cf895e0e1504b3e344c9d0fc1481d6 Signed-off-by: Alon Bar-Lev <[email protected]> --- M packaging/pythonlib/ovirt_engine/service.py 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/43/23743/1 diff --git a/packaging/pythonlib/ovirt_engine/service.py b/packaging/pythonlib/ovirt_engine/service.py index 7de871b..fd061a8 100644 --- a/packaging/pythonlib/ovirt_engine/service.py +++ b/packaging/pythonlib/ovirt_engine/service.py @@ -26,6 +26,7 @@ import sys import time import tempfile +import resource import gettext _ = lambda m: gettext.dgettext(message=m, domain='ovirt-engine') @@ -372,6 +373,12 @@ raise + def _setLimits(self): + self.logger.debug('Setting rlimits') + for limit in (resource.RLIMIT_NPROC, resource.RLIMIT_NOFILE): + soft, hard = resource.getrlimit(resource.RLIMIT_NPROC) + resource.setrlimit(resource.RLIMIT_NPROC, (hard, hard)) + def _sd_notify_ready(self): """ NOTICE: systemd-notify is not working! @@ -432,6 +439,8 @@ ): self.logger.debug('I am a daemon %s', os.getpid()) + self._setLimits() + try: with PidFile(self._options.pidfile): self.daemonContext() -- To view, visit http://gerrit.ovirt.org/23743 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9f89a1519cf895e0e1504b3e344c9d0fc1481d6 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.4 Gerrit-Owner: Alon Bar-Lev <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
