My Oracle Support Banner

SSL-based JDBC Thin Driver Connections Slow at oracle.security.crypto.core.SHA.j (Doc ID 2746061.1)

Last updated on JANUARY 26, 2021

Applies to:

JDBC - Version 19.3 to 19.7 [Release 18c]
Information in this document applies to any platform.

Symptoms

Intermittently, JDBC connections to the database using SSL are considered to be too slow. It intermittently takes up to 1 second to establish a connection.
The expectation is that all connections should complete in a matter of milliseconds instead.


Observations

* The problem apparently does not occur from SQL*Plus.

* It is unknown whether the problem occurs from non-SSL JDBC connections.

* There are no errors occurring -- none in the alert or listener log, and none on the application side.

* Rather, Java thread dumps show JDBC-specific threads where the top line indicates a security package -- for example:

2020/11/12 22:37:43.8:switch4::T[db.usage.xxxxxx-0:69eb8358]:xxxx.db.mon:operation still executing after 1000ms: DB2.12/sid[-1]/connect to jdbc:oracle:thin:@(DESCRIPTION=(SDU=8192)(ENABLE=BROKEN)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCPS)(HOST=<HOST>)(PORT=<PORT>)))(CONNECT_DATA=(SERVICE_NAME=<SERVICENAME>)))
Stack trace for DB2-tm-connector-3:
  at oracle.security.crypto.core.SHA.j(null:-1)
  at oracle.security.crypto.core.SHA.i(null:-1)
  at oracle.security.crypto.core.SHA.computeCurrent(null:-1)
  at oracle.security.crypto.core.PKCS12PBE.a(null:-1)
  at oracle.security.crypto.core.PKCS12PBE.a(null:-1)
  at oracle.security.crypto.core.PKCS12PBE.a(null:-1)
  at oracle.security.crypto.core.PKCS12PBE.decrypt(null:-1)
  at oracle.security.crypto.cert.PKCS12Safe.input(PKCS12Safe.java:230)
  at oracle.security.crypto.cert.PKCS12Safe.(PKCS12Safe.java:151)
  at oracle.security.crypto.cert.PKCS12.input(PKCS12.java:192)
  at oracle.security.crypto.cert.PKCS12.(PKCS12.java:135)
  at oracle.security.pki.OracleKeyStoreSpi.load(null:-1)
  at oracle.security.pki.OracleKeyStoreSpi.engineLoad(null:-1)
  at oracle.security.pki.OracleSSOKeyStoreSpi.engineLoad(null:-1)
  at java.security.KeyStore.load(KeyStore.java:1445)
  at oracle.net.nt.CustomSSLSocketFactory.loadFileBasedKeyStore(CustomSSLSocketFactory.java:924)
  at oracle.net.nt.CustomSSLSocketFactory.loadKeyStore(CustomSSLSocketFactory.java:908)
  at oracle.net.nt.CustomSSLSocketFactory.getTrustManagerArray(CustomSSLSocketFactory.java:648)
  at oracle.net.nt.CustomSSLSocketFactory.createSSLContext(CustomSSLSocketFactory.java:335)
  at oracle.net.nt.CustomSSLSocketFactory.getSSLContext(CustomSSLSocketFactory.java:307)
  at oracle.net.nt.CustomSSLSocketFactory.getSSLSocketEngine(CustomSSLSocketFactory.java:273)
  at oracle.net.nt.TcpsNTAdapter.renegotiateSession(TcpsNTAdapter.java:332)
  at oracle.net.ns.SessionAtts.renegotiateSSLSession(SessionAtts.java:510)
  at oracle.net.ns.NSProtocolNIO.negotiateConnection(NSProtocolNIO.java:292)
  at oracle.net.ns.NSProtocol.connect(NSProtocol.java:340)
  at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1600)
  at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:591)
  at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:793)
  at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:57)
  at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:747)
  at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:413)
  at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:298)
  at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:213)
  at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:191)
  at com.xxxxx.yy.db.map.util.UCPCxFactory$UCP.getConnection(UCPCxFactory.java:228)
  at com.xxxxx.yy.db.map.util.UCPCxFactory.getConnection(UCPCxFactory.java:295)
  at com.xxxxx.yy.db.map.util.UCPCxFactory.getJDBCConnection(UCPCxFactory.java:314)
  at com.xxxxx.yy.db.util.JDBCCxGetter.getJDBCConnection(JDBCCxGetter.java:88)
  at com.xxxxx.yy.db.util.JDBCCxGetter.getJDBCConnection(JDBCCxGetter.java:70)
  at com.xxxxx.yy.db.map.DatabaseType.getJDBCCoreConnection(DatabaseType.java:412)
  at com.xxxxx.yy.db.map.MAPDatabase.getJDBCCoreConnection(MAPDatabase.java:69)
  at com.xxxxx.yy.db.util.JDBCCxGetter.getJDBCConnectionForType(JDBCCxGetter.java:127)
  at com.xxxxx.yy.db.util.JDBCCxGetter.access$000(JDBCCxGetter.java:41)
  at com.xxxxx.yy.db.util.JDBCCxGetter$1.doIt(JDBCCxGetter.java:142)
  at com.xxxxx.yy.db.monitored.BaseOp.execute(BaseOp.java:270)
  at com.xxxxx.yy.db.monitored.BaseOp.run(BaseOp.java:356)
  at com.xxxxx.yy.util.SchedulerThread.processTask(SchedulerThread.java:101)
  at com.xxxxx.yy.util.ConsumerThread.doProcessTask(ConsumerThread.java:60)
  at com.xxxxx.yy.util.ConsumerThread.run(ConsumerThread.java:108)

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.