Web アプリケーションでこのエラーが発生するように、ローカルの Oracle DB 設定を微調整する方法を知りたいです。任意の入力をいただければ幸いです。
ありがとう。ユーザーのプロファイルを変更しました:
ALTER PROFILE cashnet LIMIT
SESSIONS_PER_USER UNLIMITED
CPU_PER_SESSION UNLIMITED
CPU_PER_CALL 3000
CONNECT_TIME 1
IDLE_TIME 1
LOGICAL_READS_PER_SESSION DEFAULT
LOGICAL_READS_PER_CALL 1000
PRIVATE_SGA 15K
COMPOSITE_LIMIT 5000000;
protected Properties getDefaultConnectionProps()
{
Properties prop = new Properties ();`
prop.setProperty("MinLimit", "1"); // the cache size is 5 at least
prop.setProperty("MaxLimit", "1");
prop.setProperty("InitialLimit", "2"); // create 3 connections at startup
prop.setProperty("InactivityTimeout", "1"); // seconds
prop.setProperty("TimeToLiveTimeout","30");
prop.setProperty("AbandonedConnectionTimeout", "900"); // seconds
prop.setProperty("MaxStatementsLimit", "10");
prop.setProperty("ValidateConnection","true");
prop.setProperty("PropertyCheckInterval", "60"); // seconds
System.out.println("[OracleConnector2.getDefaultConnectionProps] Setting properties");
prop.setProperty("oracle.net.READ_TIMEOUT", "1");
return prop;
}
public Connection getConnection() throws SQLException
{
OracleConnectionPoolDataSource ocpds
= (OracleConnectionPoolDataSource)_pooledConnections.get(getConectionId());
if(ocpds == null){
ocpds = new OracleConnectionPoolDataSource();
ocpds.setURL(_url);
ocpds.setUser(_user);
ocpds.setPassword(_password);
Properties prop = getDefaultConnectionProps();
if (_readtimeout != null){
_connectionProps.setProperty("oracle.jdbc.ReadTimeout", _readtimeout + "000");
}
else{
_connectionProps.setProperty("oracle.jdbc.ReadTimeout", "20000");
}
// clean up connection props for OAS
_connectionProps.remove("oracle.net.encryption_client");
_connectionProps.remove("oracle.net.encryption_types_client");
_connectionProps.remove("oracle.net.crypto_checksum_client");
_connectionProps.remove("oracle.net.crypto_checksum_types_client");
prop.putAll(_connectionProps);
ocpds.setConnectionCacheProperties (prop); // set properties
_pooledConnections.put(getConectionId(),ocpds);
}
System.out.println("[OracleConnector2.getConnection] Setting timeout");
if (_logintimeout != null){
ocpds.setLoginTimeout(Integer.parseInt(_logintimeout.trim()));
}else{
ocpds.setLoginTimeout(10);
}
PooledConnection pc = ocpds.getPooledConnection(_user,_password);
return pc.getConnection();
}