SAP / node-rfc

Asynchronous, non-blocking SAP NW RFC SDK bindings for Node.js
Apache License 2.0
252 stars 74 forks source link

rfc sdk DETAIL NiBufIConnect: #5

Closed Berdmanfolk closed 8 years ago

Berdmanfolk commented 9 years ago

Hello! I used node-rfc with socket.io for connection to different abap backend, to get information from several SAP system. If the all abap backend servers are available, then I getting results succesfully. But if some abap backend servers is not available(for example saprouter is down), then after long time I get the following message in the log file:

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

and the most pity, that the node-rfc before response for remaining abap backend(which are available) is waiting response from non available abap server, as a result the blocking the last connections and very long time of response.

It can be fixed?

Also I found at SDN post http://scn.sap.com/thread/3538125 it is very similar description problem.

bsrdjan commented 9 years ago

The node-rfc is based on SAP NW RFC Library (RFC SDK) and also works as described in the article, eg. no impact on connection timeout. The connection timeout functionality could be implemented in a "convenience" layer, on top of node-rfc, as a part of the connection pool for example.

Production applications with closed source RFC connectors (Java, .Net ...) usually open some more RFC connections in advance, so when the new connection needed, the one can be immediately taken from the pool, without waiting for the authentication and opening. The timeout check could be added in one such "convenience layer", rather than the node-rfc itself.

Due to event based nature, blocking the singe one node-rfc connection does not prevent others from running.

Berdmanfolk commented 9 years ago

Thanks for your answer, I checked the same script on windows platform(win 7 64 bit), and for me on the windows platform works all normal, when I am sending several requests, the requests is not blocked each other. And if one request is not reach abap server, this request is not prevent another requests are get data.

On Linux machine different situation, if there is at least one request wich cannot to connect to abap server, then other requests are waiting of this one(~60 sec)?

Thus it is depent of OS platform?

bsrdjan commented 9 years ago

It should not be platform dependent. Could you eventually share the test script, to try it on mine test systems?

bsrdjan commented 9 years ago

just released the upgrade for nodejs 0.12.x version. if the issue still occurs please send me the script to test.

bsrdjan commented 8 years ago

close due to inactivity