diff --git a/SAS/TMSS/backend/services/scheduling/bin/tmss_scheduling_service b/SAS/TMSS/backend/services/scheduling/bin/tmss_scheduling_service index c882e87eb41e5f794dc22ccd59c8b46a781627f9..50d4f8cf017c3ed4b57ff36b8baf1101c23d6972 100755 --- a/SAS/TMSS/backend/services/scheduling/bin/tmss_scheduling_service +++ b/SAS/TMSS/backend/services/scheduling/bin/tmss_scheduling_service @@ -31,10 +31,13 @@ def main(): logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.INFO) - # some parts of scheduling use recursion. Bump the conservative python recursion limit. - import resource, sys - resource.setrlimit(resource.RLIMIT_STACK, resource.RLIM_INFINITY) - sys.setrecursionlimit(10000) + try: + # some parts of scheduling use recursion. Bump the conservative python recursion limit. + import resource, sys + resource.setrlimit(resource.RLIMIT_STACK, (resource.RLIM_INFINITY, resource.RLIM_INFINITY)) + sys.setrecursionlimit(10000) + except Exception as e: + logger.error(e) # Check the invocation arguments parser = OptionParser('%prog [options]',