From 00344a9ed6b39e1c96f44ed4440f3c440dff44e8 Mon Sep 17 00:00:00 2001 From: Prithwish Mukherjee Date: Wed, 20 May 2026 18:59:06 +0530 Subject: [PATCH 01/11] chore: Increase start_timeout and link it to Preferences -> IdleTimeout for Fluent. --- src/ansys/fluent/core/launcher/launcher.py | 2 +- .../core/launcher/standalone_launcher.py | 28 +++++++++++++++++-- src/ansys/fluent/core/module_config.py | 4 +-- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/ansys/fluent/core/launcher/launcher.py b/src/ansys/fluent/core/launcher/launcher.py index 0f8c149a404..207ac04f4d4 100644 --- a/src/ansys/fluent/core/launcher/launcher.py +++ b/src/ansys/fluent/core/launcher/launcher.py @@ -237,7 +237,7 @@ def launch_fluent( journal(s). The default is ``None``. start_timeout : int, optional Maximum allowable time in seconds for connecting to the Fluent - server. The default is ``60`` if Fluent is launched outside a Slurm environment, + server. The default is ``180`` if Fluent is launched outside a Slurm environment, no timeout if Fluent is launched within a Slurm environment. additional_arguments : str, optional Additional arguments to send to Fluent as a string in the same diff --git a/src/ansys/fluent/core/launcher/standalone_launcher.py b/src/ansys/fluent/core/launcher/standalone_launcher.py index 11c6bbe1ac0..dbac5317207 100644 --- a/src/ansys/fluent/core/launcher/standalone_launcher.py +++ b/src/ansys/fluent/core/launcher/standalone_launcher.py @@ -37,6 +37,7 @@ import inspect import logging +import math import os from pathlib import Path import subprocess @@ -89,7 +90,7 @@ def __init__( precision: Precision | str | None = None, processor_count: int | None = None, journal_file_names: None | str | list[str] = None, - start_timeout: int = 60, + start_timeout: int = 180, additional_arguments: str = "", env: Dict[str, Any] | None = None, cleanup_on_exit: bool = True, @@ -137,7 +138,7 @@ def __init__( journal_file_names : str or list of str, optional Path(s) to a Fluent journal file(s) that Fluent will execute. Defaults to ``None``. start_timeout : int, optional - Maximum time in seconds allowed for connecting to the Fluent server. Defaults to 60 seconds. + Maximum time in seconds allowed for connecting to the Fluent server. Defaults to 180 seconds. additional_arguments : str, optional Additional command-line arguments for Fluent, formatted as they would be on the command line. env : dict[str, str], optional @@ -198,7 +199,16 @@ def __init__( ui_mode = UIMode.GUI self.argvals["ui_mode"] = UIMode(ui_mode) if self.argvals["start_timeout"] is None: - self.argvals["start_timeout"] = 60 + self.argvals["start_timeout"] = 180 + # FLUENT_MAX_IDLE_TIMEOUT is in minutes; start_timeout is in seconds. + _idle_timeout_minutes = math.ceil(self.argvals["start_timeout"] / 60) + # Fluent to self-terminate after start_timeout seconds of idleness so + # that a failed-connection launch does not leave a stale process behind. + _setenv_arg = f"-setenv=FLUENT_MAX_IDLE_TIMEOUT={_idle_timeout_minutes}" + if self.argvals["additional_arguments"]: + self.argvals["additional_arguments"] += f" {_setenv_arg}" + else: + self.argvals["additional_arguments"] = _setenv_arg if self.argvals["lightweight_mode"] is None: self.argvals["lightweight_mode"] = False fluent_version = _get_standalone_launch_fluent_version(self.argvals) @@ -294,6 +304,18 @@ def __call__(self): if len(values) == 3: ip, port, password = values watchdog.launch(os.getpid(), port, password, ip) + # PyFluent is now connected: disable the idle-timeout guard. + try: + from ansys.fluent.core.services.datamodel_se import ( + convert_path_to_se_path, + ) + + pref = session.preferences.General.IdleTimeout + pref.service.set_state( + pref.rules, convert_path_to_se_path(pref.path), 0 + ) + except Exception as ex: + logger.debug(f"Could not reset IdleTimeout preference: {ex}") if self.argvals["case_file_name"]: if FluentMode.is_meshing(self.argvals["mode"]): session.tui.file.read_case(self.argvals["case_file_name"]) diff --git a/src/ansys/fluent/core/module_config.py b/src/ansys/fluent/core/module_config.py index ec321a7f6d1..51241885f4f 100644 --- a/src/ansys/fluent/core/module_config.py +++ b/src/ansys/fluent/core/module_config.py @@ -259,9 +259,9 @@ class Config: lambda instance: instance._env.get("PYFLUENT_USE_PODMAN_COMPOSE") == "1" ) - #: The timeout in seconds to wait for Fluent to launch, defaults to the value of ``PYFLUENT_FLUENT_LAUNCH_TIMEOUT`` environment variable or 60 seconds. + #: The timeout in seconds to wait for Fluent to launch, defaults to the value of ``PYFLUENT_FLUENT_LAUNCH_TIMEOUT`` environment variable or 180 seconds. launch_fluent_timeout = _ConfigDescriptor["Config"]( - lambda instance: int(instance._env.get("PYFLUENT_FLUENT_LAUNCH_TIMEOUT", 60)) + lambda instance: int(instance._env.get("PYFLUENT_FLUENT_LAUNCH_TIMEOUT", 180)) ) #: Whether to show the Fluent GUI when launching the server, defaults to the value of ``PYFLUENT_SHOW_SERVER_GUI`` environment variable. From 2674a8dbd08bb5c805adcc08fff1a344e2d8f26d Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Wed, 20 May 2026 14:06:50 +0000 Subject: [PATCH 02/11] chore: adding changelog file 5147.maintenance.md [dependabot-skip] --- doc/changelog.d/5147.maintenance.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/5147.maintenance.md diff --git a/doc/changelog.d/5147.maintenance.md b/doc/changelog.d/5147.maintenance.md new file mode 100644 index 00000000000..6e838ce327a --- /dev/null +++ b/doc/changelog.d/5147.maintenance.md @@ -0,0 +1 @@ +Increase start_timeout and link it to Preferences -> IdleTimeo… From 4520940688eb951cd05755aea00df5368fc4221d Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Wed, 20 May 2026 14:08:31 +0000 Subject: [PATCH 03/11] chore: adding changelog file 5147.maintenance.md [dependabot-skip] --- doc/changelog.d/5147.maintenance.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/5147.maintenance.md b/doc/changelog.d/5147.maintenance.md index 6e838ce327a..835a23aea4f 100644 --- a/doc/changelog.d/5147.maintenance.md +++ b/doc/changelog.d/5147.maintenance.md @@ -1 +1 @@ -Increase start_timeout and link it to Preferences -> IdleTimeo… +Increase start_timeout and link it to Fluent's Idle timeout From 268f710c01fa5a18c0bd00db3c153a6868e194f9 Mon Sep 17 00:00:00 2001 From: Prithwish Mukherjee Date: Wed, 20 May 2026 20:08:04 +0530 Subject: [PATCH 04/11] Update to scheme calls. --- .../core/launcher/standalone_launcher.py | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/ansys/fluent/core/launcher/standalone_launcher.py b/src/ansys/fluent/core/launcher/standalone_launcher.py index dbac5317207..fa8a161506a 100644 --- a/src/ansys/fluent/core/launcher/standalone_launcher.py +++ b/src/ansys/fluent/core/launcher/standalone_launcher.py @@ -201,14 +201,17 @@ def __init__( if self.argvals["start_timeout"] is None: self.argvals["start_timeout"] = 180 # FLUENT_MAX_IDLE_TIMEOUT is in minutes; start_timeout is in seconds. - _idle_timeout_minutes = math.ceil(self.argvals["start_timeout"] / 60) + # Just as a safe precaution we are adding an extra minute to the Fluent idle timeout. + _idle_timeout_minutes = math.ceil(self.argvals["start_timeout"] / 60) + 1 # Fluent to self-terminate after start_timeout seconds of idleness so # that a failed-connection launch does not leave a stale process behind. - _setenv_arg = f"-setenv=FLUENT_MAX_IDLE_TIMEOUT={_idle_timeout_minutes}" + _set_timeout_arg = ( + f"-command=(set-session-idle-timeoutPLF+{_idle_timeout_minutes})" + ) if self.argvals["additional_arguments"]: - self.argvals["additional_arguments"] += f" {_setenv_arg}" + self.argvals["additional_arguments"] += f" {_set_timeout_arg}" else: - self.argvals["additional_arguments"] = _setenv_arg + self.argvals["additional_arguments"] = _set_timeout_arg if self.argvals["lightweight_mode"] is None: self.argvals["lightweight_mode"] = False fluent_version = _get_standalone_launch_fluent_version(self.argvals) @@ -306,13 +309,8 @@ def __call__(self): watchdog.launch(os.getpid(), port, password, ip) # PyFluent is now connected: disable the idle-timeout guard. try: - from ansys.fluent.core.services.datamodel_se import ( - convert_path_to_se_path, - ) - - pref = session.preferences.General.IdleTimeout - pref.service.set_state( - pref.rules, convert_path_to_se_path(pref.path), 0 + session.scheme_eval.eval( + f"(set-session-idle-timeout {session.preferences.General.IdleTimeout()})" ) except Exception as ex: logger.debug(f"Could not reset IdleTimeout preference: {ex}") From 0790be7fefd2309bfbe35f080c8d0278bca0dcf8 Mon Sep 17 00:00:00 2001 From: Prithwish Mukherjee Date: Wed, 20 May 2026 20:12:52 +0530 Subject: [PATCH 05/11] Update timeout. --- src/ansys/fluent/core/launcher/container_launcher.py | 6 +++--- src/ansys/fluent/core/launcher/fluent_container.py | 4 ++-- src/ansys/fluent/core/session_utilities.py | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/ansys/fluent/core/launcher/container_launcher.py b/src/ansys/fluent/core/launcher/container_launcher.py index ba0944a3c1a..9e49abcef5e 100644 --- a/src/ansys/fluent/core/launcher/container_launcher.py +++ b/src/ansys/fluent/core/launcher/container_launcher.py @@ -102,7 +102,7 @@ def __init__( dimension: Dimension | int | None = None, precision: Precision | str | None = None, processor_count: int | None = None, - start_timeout: int = 60, + start_timeout: int = 180, additional_arguments: str = "", container_dict: dict | None = None, dry_run: bool = False, @@ -146,7 +146,7 @@ def __init__( Specifies the number of processors to use. Defaults to ``None``, which uses 1 processor. In job scheduler environments, this value limits the total number of allocated cores. start_timeout : int, optional - Maximum allowable time in seconds for connecting to the Fluent server. Defaults to 60 seconds. + Maximum allowable time in seconds for connecting to the Fluent server. Defaults to 180 seconds. additional_arguments : str, optional Additional command-line arguments for Fluent, formatted as they would be on the command line. container_dict : dict, optional @@ -212,7 +212,7 @@ def __init__( } self.argvals, self.new_session = _get_argvals_and_session(argvals) if self.argvals["start_timeout"] is None: - self.argvals["start_timeout"] = 60 + self.argvals["start_timeout"] = 180 self.file_transfer_service = file_transfer_service if self.argvals["mode"] == FluentMode.SOLVER_ICING: self.argvals["fluent_icing"] = True diff --git a/src/ansys/fluent/core/launcher/fluent_container.py b/src/ansys/fluent/core/launcher/fluent_container.py index ac9d22fd242..8818ca95e72 100644 --- a/src/ansys/fluent/core/launcher/fluent_container.py +++ b/src/ansys/fluent/core/launcher/fluent_container.py @@ -473,7 +473,7 @@ def configure_container_dict( def start_fluent_container( args: List[str], container_dict: dict | None = None, - start_timeout: int = 60, + start_timeout: int = 180, compose_config: ComposeConfig | None = None, ) -> tuple[int, str, Any]: """Start a Fluent container. @@ -485,7 +485,7 @@ def start_fluent_container( container_dict : dict, optional Dictionary with Docker container configuration. start_timeout : int, optional - Timeout in seconds for the container to start. If not specified, it defaults to 60 + Timeout in seconds for the container to start. If not specified, it defaults to 180 seconds. compose_config : ComposeConfig, optional Configuration for Docker Compose, if using Docker Compose to launch the container. diff --git a/src/ansys/fluent/core/session_utilities.py b/src/ansys/fluent/core/session_utilities.py index fff2926411f..540b32acbad 100644 --- a/src/ansys/fluent/core/session_utilities.py +++ b/src/ansys/fluent/core/session_utilities.py @@ -69,7 +69,7 @@ def from_install( precision: Precision | str | None = None, processor_count: int | None = None, journal_file_names: None | str | list[str] = None, - start_timeout: int = 60, + start_timeout: int = 180, additional_arguments: str = "", env: Dict[str, Any] = {}, # noqa: B006 cleanup_on_exit: bool = True, @@ -115,7 +115,7 @@ def from_install( journal_file_names : str or list of str, optional Path(s) to a Fluent journal file(s) that Fluent will execute. Defaults to ``None``. start_timeout : int, optional - Maximum time in seconds allowed for connecting to the Fluent server. Defaults to 60 seconds. + Maximum time in seconds allowed for connecting to the Fluent server. Defaults to 180 seconds. additional_arguments : str, optional Additional command-line arguments for Fluent, formatted as they would be on the command line. env : dict[str, str], optional @@ -180,7 +180,7 @@ def from_container( dimension: Dimension | int | None = None, precision: Precision | str | None = None, processor_count: int | None = None, - start_timeout: int = 60, + start_timeout: int = 180, additional_arguments: str = "", container_dict: dict | None = None, dry_run: bool = False, @@ -222,7 +222,7 @@ def from_container( Specifies the number of processors to use. Defaults to ``None``, which uses 1 processor. In job scheduler environments, this value limits the total number of allocated cores. start_timeout : int, optional - Maximum allowable time in seconds for connecting to the Fluent server. Defaults to 60 seconds. + Maximum allowable time in seconds for connecting to the Fluent server. Defaults to 180 seconds. additional_arguments : str, optional Additional command-line arguments for Fluent, formatted as they would be on the command line. container_dict : dict, optional @@ -289,7 +289,7 @@ def from_pim( dimension: Dimension | int | None = None, precision: Precision | str | None = None, processor_count: int | None = None, - start_timeout: int = 60, + start_timeout: int = 180, additional_arguments: str = "", cleanup_on_exit: bool = True, dry_run: bool | None = None, @@ -325,7 +325,7 @@ def from_pim( Specifies the number of processors to use. Defaults to ``None``, which uses 1 processor. In job scheduler environments, this value limits the total number of allocated cores. start_timeout : int, optional - Maximum allowable time in seconds for connecting to the Fluent server. Defaults to 60 seconds. + Maximum allowable time in seconds for connecting to the Fluent server. Defaults to 180 seconds. additional_arguments : str, optional Additional command-line arguments for Fluent, formatted as they would be on the command line. cleanup_on_exit : bool From 2dac422edb2fc95a175ef10987dc33eee6117e51 Mon Sep 17 00:00:00 2001 From: Prithwish Mukherjee Date: Wed, 20 May 2026 20:16:16 +0530 Subject: [PATCH 06/11] Update timeout. --- src/ansys/fluent/core/launcher/standalone_launcher.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ansys/fluent/core/launcher/standalone_launcher.py b/src/ansys/fluent/core/launcher/standalone_launcher.py index fa8a161506a..2d5eb2c5f07 100644 --- a/src/ansys/fluent/core/launcher/standalone_launcher.py +++ b/src/ansys/fluent/core/launcher/standalone_launcher.py @@ -200,11 +200,9 @@ def __init__( self.argvals["ui_mode"] = UIMode(ui_mode) if self.argvals["start_timeout"] is None: self.argvals["start_timeout"] = 180 - # FLUENT_MAX_IDLE_TIMEOUT is in minutes; start_timeout is in seconds. - # Just as a safe precaution we are adding an extra minute to the Fluent idle timeout. + # FLUENT_MAX_IDLE_TIMEOUT is in minutes; +1 ensures the minute-granularity + # timer never fires before start_timeout elapses, leaving no stale process. _idle_timeout_minutes = math.ceil(self.argvals["start_timeout"] / 60) + 1 - # Fluent to self-terminate after start_timeout seconds of idleness so - # that a failed-connection launch does not leave a stale process behind. _set_timeout_arg = ( f"-command=(set-session-idle-timeoutPLF+{_idle_timeout_minutes})" ) From 87c262ad58930a6fac2bf4f87055acf13dd77e88 Mon Sep 17 00:00:00 2001 From: Prithwish Mukherjee Date: Wed, 20 May 2026 21:10:03 +0530 Subject: [PATCH 07/11] Updates. --- .../core/launcher/standalone_launcher.py | 13 +++++++++---- .../fluent/core/services/app_utilities_v1.py | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/ansys/fluent/core/launcher/standalone_launcher.py b/src/ansys/fluent/core/launcher/standalone_launcher.py index 2d5eb2c5f07..7788d3d82d1 100644 --- a/src/ansys/fluent/core/launcher/standalone_launcher.py +++ b/src/ansys/fluent/core/launcher/standalone_launcher.py @@ -307,11 +307,16 @@ def __call__(self): watchdog.launch(os.getpid(), port, password, ip) # PyFluent is now connected: disable the idle-timeout guard. try: - session.scheme_eval.eval( - f"(set-session-idle-timeout {session.preferences.General.IdleTimeout()})" - ) + if session.get_fluent_version() >= FluentVersion.v271: + session._app_utilities.set_idle_timeout( + session.preferences.General.IdleTimeout() + ) + else: + session.scheme_eval.eval( + f"(set-session-idle-timeout {session.preferences.General.IdleTimeout()})" + ) except Exception as ex: - logger.debug(f"Could not reset IdleTimeout preference: {ex}") + logger.debug(f"Could not reset Idle Timeout: {ex}") if self.argvals["case_file_name"]: if FluentMode.is_meshing(self.argvals["mode"]): session.tui.file.read_case(self.argvals["case_file_name"]) diff --git a/src/ansys/fluent/core/services/app_utilities_v1.py b/src/ansys/fluent/core/services/app_utilities_v1.py index cca05189349..591953a2151 100644 --- a/src/ansys/fluent/core/services/app_utilities_v1.py +++ b/src/ansys/fluent/core/services/app_utilities_v1.py @@ -96,6 +96,12 @@ def cancel_pause_solve( """CancelPauseSolve RPC of Events service (v1).""" return self._events_stub.CancelPauseSolve(request, metadata=self._metadata) + def set_idle_timeout( + self, request: AppUtilitiesProtoModule.SetIdleTimeoutRequest + ) -> AppUtilitiesProtoModule.SetIdleTimeoutResponse: + """SetIdleTimeout RPC of ApplicationRuntime service (v1).""" + return self._stub.SetIdleTimeout(request, metadata=self._metadata) + class AppUtilities(_AppUtilitiesV0): """AppUtilities (v1 proto API).""" @@ -162,6 +168,18 @@ def is_solution_data_available(self) -> bool: response = self.service.is_data_available(request) return response.is_data_available + def set_idle_timeout(self, timeout: int) -> None: + """Set the Fluent session idle timeout. + + Parameters + ---------- + timeout : int + Idle timeout duration in minutes. Pass 0 to disable the idle timeout. + """ + request = AppUtilitiesProtoModule.SetIdleTimeoutRequest() + request.timeout = timeout + self.service.set_idle_timeout(request) + class AppUtilitiesV252(AppUtilities): """AppUtilitiesV252 (v1 proto API). From 4e77d98ae11165d9f314c71aa9a7aee41b78714d Mon Sep 17 00:00:00 2001 From: Prithwish Mukherjee Date: Wed, 20 May 2026 22:04:25 +0530 Subject: [PATCH 08/11] Updates. --- src/ansys/fluent/core/launcher/standalone_launcher.py | 2 +- src/ansys/fluent/core/services/app_utilities_v1.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ansys/fluent/core/launcher/standalone_launcher.py b/src/ansys/fluent/core/launcher/standalone_launcher.py index 7788d3d82d1..e33242096d5 100644 --- a/src/ansys/fluent/core/launcher/standalone_launcher.py +++ b/src/ansys/fluent/core/launcher/standalone_launcher.py @@ -309,7 +309,7 @@ def __call__(self): try: if session.get_fluent_version() >= FluentVersion.v271: session._app_utilities.set_idle_timeout( - session.preferences.General.IdleTimeout() + session.preferences.General.IdleTimeout() * 60 ) else: session.scheme_eval.eval( diff --git a/src/ansys/fluent/core/services/app_utilities_v1.py b/src/ansys/fluent/core/services/app_utilities_v1.py index 591953a2151..445b479a61b 100644 --- a/src/ansys/fluent/core/services/app_utilities_v1.py +++ b/src/ansys/fluent/core/services/app_utilities_v1.py @@ -174,10 +174,10 @@ def set_idle_timeout(self, timeout: int) -> None: Parameters ---------- timeout : int - Idle timeout duration in minutes. Pass 0 to disable the idle timeout. + Idle timeout duration in seconds. Pass 0 to disable the idle timeout. """ request = AppUtilitiesProtoModule.SetIdleTimeoutRequest() - request.timeout = timeout + request.timeout.seconds = timeout self.service.set_idle_timeout(request) From fecc98ae7e82ac647deafa137e796adbfe0980a6 Mon Sep 17 00:00:00 2001 From: Prithwish Mukherjee Date: Tue, 2 Jun 2026 21:34:13 +0530 Subject: [PATCH 09/11] Update ansys-api-fluent's version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6d3cac438a2..ab9410bce69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ classifiers = [ "Operating System :: OS Independent" ] dependencies = [ - "ansys-api-fluent>=0.3.40", + "ansys-api-fluent>=0.3.41", "ansys-platform-instancemanagement~=1.1", "ansys-tools-common>=0.4.0", "ansys-tools-filetransfer>=0.2,<1.0", From ab03739b4f04231ec2be8183c7427777e89b40bd Mon Sep 17 00:00:00 2001 From: Prithwish Mukherjee Date: Tue, 9 Jun 2026 12:55:34 +0530 Subject: [PATCH 10/11] Update logic. --- .../core/launcher/standalone_launcher.py | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/ansys/fluent/core/launcher/standalone_launcher.py b/src/ansys/fluent/core/launcher/standalone_launcher.py index ae92af88db7..e7ef24984c8 100644 --- a/src/ansys/fluent/core/launcher/standalone_launcher.py +++ b/src/ansys/fluent/core/launcher/standalone_launcher.py @@ -224,6 +224,15 @@ def __init__( self.argvals["ui_mode"] = UIMode(kwargs.get("ui_mode")) if self.argvals.get("start_timeout") is None: self.argvals["start_timeout"] = 180 + # +1 ensures the minute-granularity timer never fires before start_timeout elapses. + _idle_timeout_minutes = math.ceil(self.argvals["start_timeout"] / 60) + 1 + _set_timeout_arg = ( + f"-command=(set-session-idle-timeoutPLF+{_idle_timeout_minutes})" + ) + if self.argvals["additional_arguments"]: + self.argvals["additional_arguments"] += f" {_set_timeout_arg}" + else: + self.argvals["additional_arguments"] = _set_timeout_arg if self.argvals.get("lightweight_mode") is None: self.argvals["lightweight_mode"] = False fluent_version = _get_standalone_launch_fluent_version(self.argvals) @@ -279,7 +288,7 @@ def __call__( try: _await_fluent_launch( self._server_info_file_name, - self.argvals.get("start_timeout", 60), + self.argvals.get("start_timeout", 180), self._sifile_last_mtime, process.pid, ) @@ -294,7 +303,7 @@ def __call__( process = subprocess.Popen(launch_cmd, **self._kwargs) _await_fluent_launch( self._server_info_file_name, - self.argvals.get("start_timeout", 60), + self.argvals.get("start_timeout", 180), self._sifile_last_mtime, process.pid, ) @@ -327,6 +336,18 @@ def __call__( ip, inside_container=False, ) + # PyFluent is now connected: disable the idle-timeout guard. + try: + if session.get_fluent_version() >= FluentVersion.v271: + session._app_utilities.set_idle_timeout( + session.preferences.General.IdleTimeout() * 60 + ) + else: + session.scheme_eval.eval( + f"(set-session-idle-timeout {session.preferences.General.IdleTimeout()})" + ) + except Exception as ex: + logger.debug(f"Could not reset Idle Timeout: {ex}") if self.argvals.get("case_file_name"): if FluentMode.is_meshing(self.argvals.get("mode")): session.tui.file.read_case(self.argvals.get("case_file_name")) From cfeddd916eb4baa3f552f96bfcd2a944d12123d0 Mon Sep 17 00:00:00 2001 From: Prithwish Mukherjee <109645853+prmukherj@users.noreply.github.com> Date: Wed, 10 Jun 2026 13:12:52 +0530 Subject: [PATCH 11/11] Apply suggestion from @prmukherj --- src/ansys/fluent/core/launcher/standalone_launcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ansys/fluent/core/launcher/standalone_launcher.py b/src/ansys/fluent/core/launcher/standalone_launcher.py index e7ef24984c8..b4725cff10f 100644 --- a/src/ansys/fluent/core/launcher/standalone_launcher.py +++ b/src/ansys/fluent/core/launcher/standalone_launcher.py @@ -227,7 +227,7 @@ def __init__( # +1 ensures the minute-granularity timer never fires before start_timeout elapses. _idle_timeout_minutes = math.ceil(self.argvals["start_timeout"] / 60) + 1 _set_timeout_arg = ( - f"-command=(set-session-idle-timeoutPLF+{_idle_timeout_minutes})" + f'-command="(set-session-idle-timeoutPLF+{_idle_timeout_minutes})"' ) if self.argvals["additional_arguments"]: self.argvals["additional_arguments"] += f" {_set_timeout_arg}"