cancel
Showing results for 
Search instead for 
Did you mean: 

webdynpro JCO - RFC Connections are not closing in back end ECC (SM51)

Former Member
0 Kudos

Hi Experts,

we are running ESS/MSS and some custom webdynpro applications in our portal (EP 7 SP 13). When users login to portal and click on ESS and custom webdynpro applications , we can see RFC connections are being created in back end SM 51. when user logoff from portal, we can see few rfc (probably ESS/MSS) are getting closed and few are not (custom webdynpro apps).

i have included below code in component controller doexit method. But it didn't help . I can still see RFC connections running in back end ECC (SM 51)

try {

PmpFormsProModel svModel =

(PmpFormsProModel) WDModelFactory.getModelInstance(

PmpFormsProModel.class);

PMPSalesModel slsModel =

(PMPSalesModel) WDModelFactory.getModelInstance(

PMPSalesModel.class);

svModel.disconnectIfAlive();

slsModel.disconnectIfAlive();

logger.setDescription(

"dosconnected models(PmpFormsProModel,PMPSalesModel)rfc connections successfully.....");

} catch (Exception e) {

}

Please suggets.

Accepted Solutions (1)

Accepted Solutions (1)

former_member185086
Active Contributor
0 Kudos

Hi

Alternatively you can define the seesion as

<model object> inv_model= new model object> (WDModelScopeType.TASK_SCOPE);

in this case connection will be release just after responce call

BR

Satish Kumar

Former Member
0 Kudos

Hi Srinivas/sarbjeet singh /Satish,

Is there any SAP note or white paper explains above connections closing approach . Because i never came across any SAP standard documentation which explains to do above steps as a mandatory .

Please suggest.

Thanks

Aravind

former_member185086
Active Contributor
0 Kudos

Hi

Please have a look

1.[Help1|;

Best Regards

Satish Kumar

Former Member
0 Kudos

Hello,

have you solved your problem?

We have the same issue e we don't know how to solve it.

Thank yuo.

Regards

Former Member
0 Kudos

Hi Matteo,

We came across couple of different error messages and all these basically about the increasing connections in back end as well as portal. Below are the notes that helped us and suggested by SAP.

Note 1388694 - Hanging connections to JCo

Note 314530 - Number of RFC/CPIC connections for external client

Note 568271 - Lifetime of an RFC connections

Note 894100 - Maximum number of gateway clients exceeded

We started with error message "Error max no of 100 conversation exceeded" and it was fixed by setting environment variable CPIC_MAX_CONV is set to 2000 in ALL servers (Portal, and Back end ) involved in the communication.

Later we got error message u201CMax number of CPIC clients exceeded"(300) and it was fixed by increasing the value of the gw/max_sys parameter. (Note 894100 - Maximum number of gateway clients exceeded)

See if this help in your case.

Thanks

Aravind]]

Answers (2)

Answers (2)

gill367
Active Contributor
0 Kudos

Hi,

try to disconnect the model after executing by calling the function in finally


finally {
wdContext
	.current<model node>
	.modelObject()
	.modelInstance()
	.disconnectIfAlive();
		}

Thanks,

Sarbjeet Singh

Former Member
0 Kudos

HI,

There is no problem with the code. I think you need to include disconnectifalive in the finally block of the method where you call modelobject().execute() itself. You should not delay until doExit.

Srini