Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SAP .NET Connector - RfcConcurrentCallException

0 Kudos
Hallo,

I am using the latest SAP .NET Connector for a .NET application. The application is multithreaded and calls several RFC functions.


The application works fine for the most SAP systems. Unfortunately, I got one system with a very special problem. I tried to fix the problem since over a year now but I still did not find a valid solution.

When the application starts everything works fine. Sometimes everything works for days without any problem. Then the RfcConcurrentCallException occurs. This causes the complete application to stuck as the connection to the SAP system is blocked.
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.


Thank you.

Best regards

Michael

4 REPLIES 4

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert

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

0 Kudos
Hallo Markus,

thank you for your feedback. I will check this.

The program uses several stateful and stateless calls. At the moment the problem also occurs only on one system, all other systems (including my development machine) work fine.


Best regards
Michael


0 Kudos

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

0 Kudos

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