2

We have application deployed on weblogic 12c and we are seeing intermittent following exception in the logs

 

java.lang.OutOfMemoryError: GC overhead limit exceeded

and when I see the applications log4j logs at the same time I can see following exception

Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: weblogic.jdbc.extensions.PoolLimitSQLException: weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool TMP_DS_RW to allocate to applications, please increase the size of the pool and retry.. Error Code: 0

Caused by: weblogic.jdbc.extensions.PoolLimitSQLException: weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool TMP_DS_RW to allocate to applications, please increase the size of the pool and retry..

Is this happening because of number of connections in pool are exhausted?

Is there any relation between connection pool size of weblogic and java.lang.OutOfMemoryError ?

because whenever pool connections are seems to be exhausted we are facing java.lang.OutOfMemoryError.

We have tried increasing heap size from 1GB to 2GB but still we are facing java.lang.OutOfMemoryError after some time.

After using eclipse heap dump analyzer in problem suspect it is showing

The class "java.lang.ref.Finalizer", loaded by "system class loader", occupies 9,935,880 (69.45%) bytes.

Note : Maximum Capacity is set to 30 in connection pool tab of jndi datsource configuration in weblogic and we are using oracle database.

Pawan Patil
  • 1,067
  • 5
  • 20
  • 46
  • 9,935,880 (69.45%) of what ?. I am asking that question because of 1GB or 2GB are much bigger – devwebcl Sep 30 '19 at 19:59
  • @devwebcl - 1 GB – Pawan Patil Oct 01 '19 at 07:29
  • The best way would be to have the heap to analyze. Maybe it's duplicated from https://stackoverflow.com/questions/1393486/error-java-lang-outofmemoryerror-gc-overhead-limit-exceeded – devwebcl Oct 01 '19 at 20:34
  • Pool connections being exhausted would imply your database operations are under load. That same load might also explain why you run out of memory around the same time. You need to analyze the performance of what is going on in your server to figure out what should be done. Increasing the number of connections might lead to more memory being used, while inversely, decreasing them might lead to longer waits for threads, creating a bottleneck that reduces the overall memory consumption. It all depends on what your app is doing. – Chris Oct 04 '19 at 20:14

3 Answers3

1

It is possible since database connection use memory. Your application must have leak the connection pool. Try to look at your application code and check whether it release database connection correctly after used.

tinnapat
  • 356
  • 2
  • 12
1

java.lang.OutOfMemoryError: GC overhead limit exceeded

This error gets thrown when all of following conditions are met:

  1. The amount of time spent in full GCs exceeds the value specified by the -XX:GCTimeLimit=N flag. The default value is 98 (i.e., if 98% of the time is spent in GC).
  2. The amount of memory reclaimed by a full GC is less than the value specified by the -XX:GCHeapFreeLimit=N flag. The default value for this is 2, meaning that if less than 2% of the heap is freed during the full GC, this condition is met.
  3. The above two conditions have held true for five consecutive full GC cycles (that value is not tunable). Heap Analysis | 187
  4. The value of the -XX:+UseGCOverheadLimit flag is true (which it is by default).

Source: Java Performance, the definitive guide

If increasing the heap size doesn't fix it, check if the CPU isn't the bottleneck.

-XX:+PrintGCDetails
-Xloggc:<path>

This will log info about the GC to the . If you see a non-stop build up of the heap size, then you have a memory leak and are probably not closing you connections.

0

Did you try to monitor the connections from the WebLogic Console ? Services -> Data Sources -> (choose your dataSource) -> (tab) Monitoring and there you should have a "realtime" view of the connections.

Stefan
  • 11
  • 3