My application had a OOM issue, and the Finalizer thread is BLOCKED:
at net.sourceforge.jtds.jdbc.JtdsConnection.releaseTds(JtdsConnection.java:
2024)
at net.sourceforge.jtds.jdbc.JtdsStatement.close(JtdsStatement.java:972)
at
net.sourceforge.jtds.jdbc.JtdsPreparedStatement.close(JtdsStatement.java:707
)
at net.sourceforge.jtds.jdbc.JtdsStatement.finalize(JtdsStatement.java:
219)
at java.lang.System$2.invokeFinalize(Unknown Source)
at java.lang.ref.Finalizer.runFinalizer(Unknown Source)
at java.lang.ref.Finalizer.access$100(Unknown Source)
at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
I saw a lot of errors below in the log:
java.sql.SQLException: Transaction (Process ID 123) was deadlocked on lock
resources with another process and has been chosen as the deadlock victim.
Rerun the transaction.
at
net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:373)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
at
net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
at
net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
at
net.sourceforge.jtds.jdbc.JtdsPreparedStatement.execute(JtdsPreparedStatement.java:784)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
...
...
I have some threads which could generate a lot of jtdsPreparedStatement
objects in a single thread. I don't know if that can cause the memory leak
issue?
I am using version 1.3.1 of jtds, at r1248. My JRE version is 1.8.0_u144.
Thanks for the help!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My application had a OOM issue, and the Finalizer thread is BLOCKED:
at net.sourceforge.jtds.jdbc.JtdsConnection.releaseTds(JtdsConnection.java:
2024)
at net.sourceforge.jtds.jdbc.JtdsStatement.close(JtdsStatement.java:972)
at
net.sourceforge.jtds.jdbc.JtdsPreparedStatement.close(JtdsStatement.java:707
)
at net.sourceforge.jtds.jdbc.JtdsStatement.finalize(JtdsStatement.java:
219)
at java.lang.System$2.invokeFinalize(Unknown Source)
at java.lang.ref.Finalizer.runFinalizer(Unknown Source)
at java.lang.ref.Finalizer.access$100(Unknown Source)
at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
I saw a lot of errors below in the log:
java.sql.SQLException: Transaction (Process ID 123) was deadlocked on lock
resources with another process and has been chosen as the deadlock victim.
Rerun the transaction.
at
net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:373)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
at
net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
at
net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
at
net.sourceforge.jtds.jdbc.JtdsPreparedStatement.execute(JtdsPreparedStatement.java:784)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
...
...
I have some threads which could generate a lot of jtdsPreparedStatement
objects in a single thread. I don't know if that can cause the memory leak
issue?
I am using version 1.3.1 of jtds, at r1248. My JRE version is 1.8.0_u144.
Thanks for the help!