2021 Nov 23 10:11 AM
I am using the latest SAP .NET Connector for a .NET application. The application is multithreaded and calls several RFC functions.
SAP.Middleware.Connector.RfcConcurrentCallException: cannot execute a call through a busy connection
at SAP.Middleware.Connector.RfcFunction.RfcCallReceive(RfcConnection conn, IRfcIOStream stream, RFCID rid)
at SAP.Middleware.Connector.RfcFunction.Invoke(RfcDestination destination)
at ...
May one of you also got this problem and got any working solution.
Michael
2022 Dec 05 8:16 AM
Hi Michael,
stumbled over this very old item ... This happens, whenever you try to execute multiple Invokes concurrently for a stateful connection. In that case a destination is set to be stateful, you need to ensure that in the respective session, only a single call is executed at once, i.e. you need to serialize the invokes. You might want to check as well, whether it is really needed to set the destination to be stateful. Because for stateless executions, this should not occur.
Best regards,
Markus
2022 Dec 06 8:04 AM
2023 Dec 04 2:16 PM
Hallo Markus,
sorry for my late reply. The problem still occurs on the one specific system. I tried to update to the latest SAP .NET Connector (3.1.3) and removed any stateful connections in my coding.
Now the problem moved to the standard method `RfcDestination.Ping()` which is used to check if the system is available before calling further functions:
SAP.Middleware.Connector.RfcConcurrentCallException: cannot execute a call through a busy connection
at SAP.Middleware.Connector.RfcFunction.RfcCallReceive(RfcConnection conn, RFCID rid)
at SAP.Middleware.Connector.RfcDestination.Ping()
...
If you have any further idea what I could check it would be great.
Thank you.
Have a nice week.
Best regards
Michael
2023 Dec 04 2:19 PM
Hi Michael,
in this case, and if you really don't use any stateful session concurrently, I suggest to open a customer ticket.
Best regards,
Markus