MultiThreadedRendezvous Error in Pymechanical

CollinsJnr Member Posts: 17
First Comment Name Dropper
edited March 5 in Structures

I am using Pymechanical and I keep getting this error

_MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.RESOURCE_EXHAUSTED details = "to-be-sent trailing metadata size exceeds peer limit" debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"to-be-sent trailing metadata size exceeds peer limit", grpc_status:8, created_time:"2024-01-30T14:31:15.8037186+00:00"}" >

My Code:

nodes = mechanical.run_python_script(""" 
import json                                                  
mesh_data = ExtAPI.DataModel.Project.Model.Analyses[0].MeshData
output_faceMesh = mesh_data.MeshRegionById(26) #26 is the Id of the surface 
input_faceMesh = mesh_data.MeshRegionById(28)  #28 is the Id of the surface 
output_nodes = output_faceMesh.NodeIds
input_nodes = input_faceMesh.NodeIds
nodes = {'output_nodes' : output_nodes,
         'input_nodes' : input_nodes    

I suspect this is data transfer limit problem in the gRPC framework in Pymechanical.
Particularly because I am dumping json which is larger in size compared to the protocol buffers.

If this is the case, is there a better way to extract the data?
If not, what then is the problem?

Thank you in advance



  • CollinsJnr
    CollinsJnr Member Posts: 17
    First Comment Name Dropper

    For anyone who has this problem in the future.
    The best way to dump large amounts of data from mechanical to Python through Pymechanical is to convert your data to strings or text.

    Strings and texts have very small data sizes, so you don't exceed the meta data limit.

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 827
    First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member

    Hi @CollinsJnr , sorry for the late answer on this. Glad you found a workaround, but I believe this is something that should be better handled from PyMechanical, even though gRPC will have some limitations over the size limit of what can be returned (~2Gb) for security reasons. Could you please open an enhancement request by opening an issue in the PyMechanical Github repo? Many thanks