pymapdl
pymapdl copied to clipboard
Implement client side retry
After so much research on the infamous MAPDL gRPC issues #3313 I have seen that there is a pattern in some issues:
- https://github.com/ansys/pymapdl/issues/2989
- https://github.com/ansys/pymapdl/issues/3156
- https://github.com/ansys/pymapdl/issues/2479
- https://github.com/ansys/pymapdl/issues/2904 (Although I'm not very sure about this one)
They all presents the grpc_status:14 in the debug_error_string. Full error:
debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-06-06T11:36:14.151348247+00:00", grpc_status:14, grpc_message:"Connection reset"}"
After researching about this grpc_status:14, I have found these references:
Hence I'm going to implement a retry mechanism, as close as possible to the gRPC interface. So we try to redo the call when this fail with this error message. I haven't decided the implementation yet.
I also believe this PR should help to fix #2479 because I'm using that model to fix it.