on 03-01-2006 8:51 PM
Hi,
I have a scenario about connecting SAP via RFC. I am connecting SAP once and storing that connection in cache. Now, I have written my codes. But, I am getting this error; RFC_ERROR_SYSTEM_FAILURE. My code is;
class MyConnection{
public SAPProxy1 sapProxy;
public MyConnection(){
sapProxy = new SAPProxy1();
SAP.Connector.Destination destination =
new SAP.Connector.Destination();
destination.AppServerHost = "...";
destination.Client = "...";
destination.Language = "....";
destination.Username = "...";
destination.Password = "...";
destination.SystemNumber = "...";
SAP.Connector.SAPConnection sapConnection =
new SAP.Connector.SAPConnection(destination);
sapProxy.Connection = sapConnection;
sapConnection.Open();
}
}
And when I need to call my method;
MyConnection myConn = (MyConnection)getFromCache();
if ( myConn == null ){
myConn = new MyConnection();
putIntoCache(myConn);
}
else if ( myConn.sapProxy == null){
myConn = new MyConnection();
putIntoCache(myConn);
}
myConn.sapProxy.Z_LIST_METERIALS(...parameters...);
The summary of my code is above. There is no problem at first. Today, I have run this code without error. But after 5 or 6 hours, we got an error as "RFC_ERROR_SYSTEM_FAILURE". I have looked the SAP using st22 tcode. But I could not see any error message. and the error message has occured at myConn.sapProxy.Z_LIST_METERIALS() code.
I am thinking that, after 5 or 6 hours SAP connection has lost. But, because of it will take hours to test this code again, I am not sure about connection has lost. and how can I understand that my connection has lost before getting this error? What are the possiblities to get this error message another? What should I do?
Thanks.
It's very likely that the server-side timeout closed the connection and after some hours you try working with a closed connection.
I recommend to use SAP .NET Connector's Connection Pooling feature instead. If you set the client side timeout of the Connection Pool shorter than the server side one, you won't see this error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry Reiner,
When I have searched ms-help://MS.VSCC.2003/SAP.NCO/NCOV2Docu/overview/Connection_pooling_and_limiting.htm in .NET, I can not find this document. But, I have found;
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003OCT.1033/dndcom/html/sapintegration.htm
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003OCT.1033/dnsql7/html/sql7sapr3.htm
But, I can not find the document that you said. I have installed .NET Connector 2003, is there any other version? Or is there any other install program to see Connection Pool document? Or, is it possible to send mail this document to my mail address?
Thanks.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.