cancel
Showing results for 
Search instead for 
Did you mean: 

Help Configuring JCo connection

Former Member
0 Kudos

I have written a Web Dynpro application that generates an Event Details report from EH&S. This application uses many RFCs (> 20) to compile this very large list of data.

Our landscape is setup so that not every portal user has a backend (R/3) account, therefore we cannot use SSO for our JCo connections, as the portal login user may or maynot have a backend account with those credentials. We have setup a single backend technical user which is the account used for the JCo connection username/password setup anytime this application is run.

My question is this...as we could have 100s of users trying to retrieve various Event Reports at the same time, is there a guide somewhere telling me what I should set maximum connections and maximum pool size to based on the number of RFCs being called and expected simultaneous user count?

Also, it appears that by default the system uses 10 millisecond for connection timeout and 30 milliseconds for maximum wait time. These values seem far too small, and also they seem like they should be the same value...

Any help would be greatly appreciated. Once the number of users starts to grow over just a dozen or so I get periodic JCo connection errors.

Accepted Solutions (1)

Accepted Solutions (1)

former_member197348
Active Contributor
0 Kudos

Hi Tom,

You are right. If max. no of connections established then you get

JCO.maximum pool size reached

so to avoid this we need to do 2 steps.

1. Increase the max. poolsize to 100 or 200

You can leave other setttings as they are or change according to your requirement.

2.In the Web Dynpro application,

in each RFC execte method, add the following code after

wdContext.current<RFC>_InputElement().modelObject().execute():
wdContext.current<RFC>_InputElement().modelObject().modelInstance().disconnectIfAlive();

Since there are too many RFCs and so many users you can use different JCo destination to a set 4-5 RFC models. Say you have 20 RFCs. 1-5 RFCs - set1 JCOs, 6-10 RFCs - set2 JCOs 11-15 RFCs - set3 JCOs 16-20 RFCs - set4 JCOs. Like this also you can improve performance and decrease the chance to reach max. pool size.

Regards,

Siva

Former Member
0 Kudos

Thank you for your assistance. I will certainly make use of the disconnectIfAlive() method.

Another question, if you don't mind. For my application, I have all 20 RFCs in a single Model. How many connections per user shoould I be consuming then? Just 1 per application run?

Thanks again.

former_member197348
Active Contributor
0 Kudos

Hi Tom,

It depends on your application, for example if you are calling "x" no. of RFCs in method/action then "x" no. of connections used in same time. But if you are calling 1 RFC in each method/action then it is 1 connection per user. If you use disconnectIfAlive() method, then certainly it reduces the connections used per application.

Regards,

Siva

Former Member
0 Kudos

This has certainly helped me. I am using code like:

Z_RFC_ABC_123 input = new Z_RFC_ABC_123();

wdContext.nodeZ_RFC_ABC_123().bind(input);

try {

input.execute();

wdContext.nodeOutput_Z_RFC_ABC_123().invalidate();

input.modelInstance().disconnectIfAlive();

}

catch(Exception ex) {

//handle exception.

}

Thanks for your assistance.

Answers (2)

Answers (2)

Former Member
0 Kudos

Please look at the below given thread

Former Member
0 Kudos

Hi Tom,

Yes you are right it will use one connection per application run. So you can use ne number of RFCs.

But you need to disconnect the alive connection after every run else it sometimes creates a problem of max connection.

Regards

Narendra