cancel
Showing results for 
Search instead for 
Did you mean: 

J2ee Connections staying open

Former Member
0 Kudos

We are getting the following errors on the java side of our ECC6 EHP4

SPS7 ABAP+JAVA environment.

In Netweaver administrator/Monitoring/Logs and Traces we see the

following:

BEGIN ERROR MESSAGES

Cannot get connection for 120 seconds. Possible reasons: 1) Connections

are cached within SystemThread(can be any server service or any code

invoked within SystemThread in the SAP J2EE Engine), 2) The pool size

of adapter "SAPPRDDB" is not enough according to the current load of

the system or 3) The specified time to wait for connection is not

enough according to the pool size and current load of the system. In

case 1) the solution is to check for cached connections using the

Connector Service list-conns command, in case 2) to increase the size

of the pool and in case 3) to increase the time to wait for connection

property. In case of application thread, there is an automatic

mechanism which detects unclosed connections and unfinished

transactions.

Connection [135730944] is NOT removed! To see all opened connections on

the server nodes change logging severity to DEBUG

END ERROR MESSAGES

The u201Cmaximum connectionsu201D on the JDBC connector is set to 100. In order

to resolve the error we reset java on the server by doing transaction

SMICM u2013 Administration-J2ee Instance (local) - send hard shutdown- with

restart. It appears that connections are not being removed and when it

gets to the maximum connections then java applications no longer

work.

How do I see how many connections are being used and how do I remove the connections

that are not really being used anymore?

Thanks in advance for your help.

Debbie Schneider

Accepted Solutions (1)

Accepted Solutions (1)

sunny_pahuja2
Active Contributor
0 Kudos

Hi,

Check SAP Note 1407557 - VMC: java.lang.Exception: No session

Thanks

Sunny

Former Member
0 Kudos

Hello,

I have faced the similar problem, but no luck on solution. But we get ride of the issue by creating one more java server node provided with physical memory required.

Regards

Raj

Former Member
0 Kudos

Hi Sunny,

Thanks for the note. We will try applying the patch to the kernel. We do not have the VMC installed. From reading about it, it looks to me like the VMC is a tool to monitor JAVA from the abap side. Is this true?

Is it something we should install? Any direction or warning for installing it?

Thanks

Debbie

sunny_pahuja2
Active Contributor
0 Kudos

Hi,

You need not to install. Just check if your kernel release is in effected release then upgrade it.

Thanks

Sunny

Former Member
0 Kudos

Hi Sunny,

Thanks for your help! You are right! Updating the kernel solved this problem.

Debbie

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Debbie,

The exception occurs because there are either inadequate DBPool connections configured OR the application which is using the dbpool connections is not releasing them. In order to troubleshoot this issue please see note 719778. In section II there are steps listed to enable debug mode on the dbpool connections. Do this BEFORE the connections are exhausted. The debug mode must be enabled before the connection is consumed in order for debug details to be captured. The output from these steps will list the consumed connections and give a short stack trace for each connection to show which application component is holding the dbpool connections. The application developer of the responsible application may need to review their code to see why the connections are not released.

Regards,

Nathan

Former Member
0 Kudos

Hi,

It appears to be like a performance problem due to max. connection reached and the amount of load on system where the occupied connection not getting released.

Unlike in ABAP WP, in java the server thread will be kept occupied as long the activity is in process.

If you had enough memory, better you create on more server node.

please check the note:

Note 723909 - Java VM settings for J2EE 6.40or7.0

Note 710146 - How to change J2EE Engine JVM Settings

Please check the below note to see if you can stop any unecessary services that are not required in your scenario.

Note 871394 - SAP NetWeaver04s-mandatory and optional J2EE Engine services

Regards,

Sitarama.