cancel
Showing results for 
Search instead for 
Did you mean: 

Error with connection pooling, while using SAP .net Connector

Former Member
0 Kudos

We are facing problems in connecting to SAP using SAP .NET connector. It initially connects and after few connections, the following error is thrown and does not go away until we restart.

The actual error message is as follows:

"Connect to SAP gateway failed\nConnect_PM GWHOST=144.250.123.56, GWSERV=sapgw00, ASHOST=144.250.123.56, SYSNR=00\n\nLOCATION CPIC (TCP/IP) on local host\nERROR max no of 100 conversations exceeded\n\nTIME Wed Jan 03 10:45:58 2007\nRELEASE 620\nCOMPONENT CPIC (TCP/IP)\nVERSION 3\nRC 466\nMODULE r3cpic.c\nLINE 10265\nCOUNTER 3\n"

Is there any way we can clear/flush these open connections via .NET code OR specify maximum connection pool?

Any advice would be greatly appreciated.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

A option to this problem in increasirly the CPIC_MAX_CONV Windows enviroment variable to a number major than 100 (the default value).

This change required reboot the system.

Regards.

Former Member
0 Kudos

You can set the connection pool paramters in web.config under


<configuration>
    <SAP>
        <Connector>
           <ConnectionPool UseAutoPooling="True" MaxOpenConnections="50" MaxCapacity="5" MaxIdleTime="200"/>
        </Connector>

    </SAP>
<configuration>

Above code, you can open maximum 50 connections at any time, and pool can hold maximum 5 five connection that is open in pool, and an open connection that is returned to pool will close after 200 minute.

Also if you use this, you should write:

Connection connection = SAPConnectionPool.GetConnection(connectionStr);

...

...your operations

SAPConnectionPool.ReturnConnection(connection);

connection.dispose();

connection = null;

Best Regards

Huseyin Akturk

-


www.huseyinakturk.net