on 04-15-2014 2:52 PM
Hello,
Is there any possibility to configure a timeout for an RFC call using .NET Connector 3.0?
RfcDestination.Ping() throws an RfcCommunicationException in about 6..7 seconds if the backend system is not reachable:
LOCATION CPIC (TCP/IP) on local host with Unicode
ERROR timeout occured
TIME Tue Apr 15 15:37:18 2014
RELEASE 720
COMPONENT NI (network interface)
VERSION 40
RC -5
MODULE nibuf.cpp
LINE 4795
DETAIL NiBufIConnect: route connect '/H/xxx.xxx.xxx.xxx/H/xxx.xxx.xxx.xxx'
timeout
COUNTER 2
The same exception type thrown from the same RfcDestination.Ping() can originate from another cpp file:
LOCATION CPIC (TCP/IP) on local host with Unicode
ERROR partner 'xxx.xxx.xxx.xxx:xxxx' not reached
TIME Fri Mar 21 15:01:36 2014
RELEASE 720
COMPONENT NI (network interface)
VERSION 40
RC -10
MODULE nixxi.cpp
LINE 3285
DETAIL NiPConnect2: xxx.xxx.xxx.xxx:xxxx
SYSTEM CALL connect
ERRNO 10060
ERRNO TEXT WSAETIMEDOUT: Connection timed out
COUNTER 2
But in the latter case the timeout is much longer, about 30 seconds.
Is it possible to configure timeouts?
Hi Michail,
there is no timeout configuration for function module invocations, however there are certain timeouts on different network layers that are inherited by NCo and which are not adjustable via NCo so far (socket timeouts).
Best regards,
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michail,
personally I've found easier to use asynchronous programming of .net, rather then dealing with non-blocking sockets ....
http://msdn.microsoft.com/en-us/library/hh191443.aspx
BR, Hynek
Hello Michail,
for using the RFC protocol to an ABAP system, it is required to use the CPIC protocol underneath. Hence, NCo itself does not have direct control over the sockets - in particular, they are even in unmanaged code sequences. Certainly, on very low level, there is the possibility to set timeouts, but not all of them are accessible through the layers and I'm not aware that the ones you refer to are available.
Best regards,
Markus
Timeout configuration could be implemented on the client side, no doubt. However, sometimes it is not obvious when the code of NCo would access the backend system. E.g. first access to the repository would be remote, the second one would use cached data. In my opinion, wrapping every piece of NCo code on client side would be an overkill.
In which way would you like to configure the timeouts? To make them longer or shorter?
If the NCO does not have any interface to set the timeout explicitly, you could use time limit decorators as describer for example here:
c# - Time Limit decorator - Code Review Stack Exchange
Or for the WSA timeouts the system wide parameters for TCP:
http://technet.microsoft.com/en-us/library/cc739819(WS.10).aspx
TcpMaxDataRetransmissions and TcpInitialRtt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hynek,
I would like to make timeouts predictable. If I set the timeout to 10 seconds I would expect that the operation would succeed or fail not later than in 10 seconds.
Time decorator approach could be one possibility, thanks for the hint! Unfortunately, that one is not a panacea because using another thread for functional module call would not be always desirable.
Tweaking system settings would be the option I would try to avoid because of several reasons. E.g. because my process would not have full control over the settings and another process can easily change them. Or or because my process would not have enough permissions to change the settings. But thanks for that hint as well.
Regards,
Michail
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.