Comments (6)
I did a bit more testing and found out that this error only occurs if I explicitly call connection.Close(). This however leads me to another question: Is the RFC connection automatically closed? And if yes, under which conditions? Thank you very much.
from node-sapnwrfc.
I also encounter this bug, albeit running both node and SAP on a linux system. My current attempt to deal with it is to run my app with pm2 to ensure it restarts as soon as it dies. Although I can't help with more details, I can answer your question. Unless connection.Close() is explicitly called, the RFC connection remains in place and can start to use up all available RFC ports over time. You can see the zombie RFC connections on the SAP side through transaction AL08.
from node-sapnwrfc.
Thanks a lot Ryan. Obviously both, auto-restart of app as well as leaving RFCs open are not production-ready solutions. Is someone able to fix this? Thanks, Nils
from node-sapnwrfc.
Im getting the same error, do you have any solution for this?
from node-sapnwrfc.
This patch might fix the issue:
---
src/Connection.cc | 8 +++++++-
diff --git a/src/Connection.cc b/src/Connection.cc
--- a/src/Connection.cc
+++ b/src/Connection.cc
@@ -36,7 +36,12 @@ Connection::Connection() :
Connection::~Connection()
{
- this->CloseConnection();
+
+ if (this->connectionHandle != nullptr) {
+ RFC_ERROR_INFO errorInfo;
+ memset(&errorInfo, 0, sizeof(RFC_ERROR_INFO));
+ RfcCloseConnection(this->connectionHandle, &errorInfo);
+ }
uv_mutex_destroy(&this->invocationMutex);
@@ -201,6 +206,7 @@ v8::Local<v8::Value> Connection::CloseConnection(void)
if (this->connectionHandle != nullptr) {
rc = RfcCloseConnection(this->connectionHandle, &errorInfo);
+ this->connectionHandle = nullptr;
if (rc != RFC_OK) {
scope.Escape(RfcError(errorInfo));
}
--
2.16.2.windows.1
from node-sapnwrfc.
We've used the same approach in our fork https://github.com/e2ebridge/node-sapnwrfc
from node-sapnwrfc.
Related Issues (20)
- Connection recovery after network failure
- Async and streaming read of table results HOT 1
- Problems compiling the module HOT 2
- Could not load the bindings file HOT 7
- RAW fields encoding issue in invocation result
- Error installing on 64-bit Linux system, RHEL HOT 3
- Collaboration? HOT 3
- Node 4.x support? HOT 2
- Time Out method HOT 3
- sapnwrfc is not installing HOT 5
- NPM Install Compile Error HOT 2
- Can't build on Ubuntu 12.04 and node.js v0.10.41 HOT 4
- Connection count limited to 4
- Unable to install sapnwrfc on Ubuntu 16.04 HOT 2
- Provide compiled binaries for node 6.9 win64
- clear cache MetaData HOT 1
- Addon from the npm registry
- Problem installing sapnwrfc HOT 1
- Issue with sapnwrfc installation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-sapnwrfc.