"MapdlConnectionError" when runnung PyMAPDL

Samukham Member Posts: 25
First Comment Name Dropper
edited February 1 in General Language Questions

Hi Team,
I have a PyMAPDL script. When I run the script I get frequently the following error:

Error using mapdl_grpc>_multi_connect
Python Error: MapdlConnectionError: Unable to connect to MAPDL gRPC instance at
Reached either maximum amount of connection attempts (5) or timeout (45 s).The MAPDL process seems to be alive (PID: 24408) but PyMAPDL cannot connect to

Error in mapdl_grpc>init (line 387)

Error in mapdl_grpc>init (line 395)

Error in launcher>launch_mapdl (line 1972)

Error in launcher>launch_mapdl (line 1993)

Error in ModalSensitivity>launch_mapdl (line 275)

Error in ModalSensitivity>perform_modal_sensitivity (line 78)

Immediately if I run the script again it runs smoothly without any issues. This error I get often like appx. once every 3-4 runs.

Please guide us in resolving the issue.


  • Samukham
    Samukham Member Posts: 25
    First Comment Name Dropper

    Any suggestion on this? As I have posted this long back and didn't receive any response yet!

  • German Martinez
    German Martinez Member, Employee Posts: 6
    First Anniversary Name Dropper First Comment Ansys Employee


    It seems to me that the launcher is taking longer to start the MAPDL instance.

    I would try to increase start_timeout:

    mapdl = launch_mapdl(start_timeout=80)