Skip to content

Commit 4345dfa

Browse files
6.1.0 Docs
1 parent 25e9aac commit 4345dfa

File tree

8 files changed

+124
-5
lines changed

8 files changed

+124
-5
lines changed

en/identity-server/6.1.0/docs/deploy/change-to-ibm-db2.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,18 @@ Apart from the basic configurations specified above, WSO2 Identity Server suppor
126126

127127
{!./includes/rollback-pending.md !}
128128

129+
### Driver-Level Timeouts (Recommended for Production)
130+
131+
{!./includes/driver-level-timeouts.md !}
132+
133+
#### Example: IBM DB2 database
134+
135+
```toml
136+
[database.identity_db]
137+
url = "jdbc:db2://DB_HOST:50000/WSO2_IDENTITY_DB:loginTimeout=10;queryTimeout=60;"
138+
username = "..."
139+
password = "..."
140+
driver = "com.ibm.db2.jcc.DB2Driver"
141+
```
142+
143+
Learn more in [IBM DB2 connection settings](https://www.ibm.com/docs/en/db2/11.5?topic=client-jdbc-properties){: target="_blank"}.

en/identity-server/6.1.0/docs/deploy/change-to-mssql.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,20 @@ A sample configuration is given below.
9191

9292
### Configure the connection pool to rollback pending transactions on connection return
9393

94-
{!./includes/rollback-pending.md !}
94+
{!./includes/rollback-pending.md !}
95+
96+
### Driver-Level Timeouts (Recommended for Production)
97+
98+
{!./includes/driver-level-timeouts.md !}
99+
100+
#### Example: MSSQL database
101+
102+
```toml
103+
[database.identity_db]
104+
url = "jdbc:sqlserver://DB_HOST:1433;databaseName=WSO2_IDENTITY_DB;loginTimeout=10;socketTimeout=60000"
105+
username = "..."
106+
password = "..."
107+
driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
108+
```
109+
110+
Learn more in [Microsoft JDBC driver properties](https://learn.microsoft.com/sql/connect/jdbc/setting-the-connection-properties){: target="_blank"}.

en/identity-server/6.1.0/docs/deploy/change-to-mysql.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,5 +114,18 @@ A sample configuration is given below.
114114

115115
{!./includes/rollback-pending.md !}
116116

117+
### Driver-Level Timeouts (Recommended for Production)
117118

118-
119+
{!./includes/driver-level-timeouts.md !}
120+
121+
#### Example: MySQL database
122+
123+
```toml
124+
[database.identity_db]
125+
url = "jdbc:mysql://DB_HOST:3306/WSO2_IDENTITY_DB?connectTimeout=10000&socketTimeout=60000&tcpKeepAlive=true"
126+
username = "..."
127+
password = "..."
128+
driver = "com.mysql.cj.jdbc.Driver"
129+
```
130+
131+
Learn more in [MySQL Connector/J properties](https://docs.oracle.com/cd/E19509-01/820-3497/agqju/index.html){: target="_blank"}.

en/identity-server/6.1.0/docs/deploy/change-to-oracle-rac.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,18 @@ Apart from the basic configurations specified above, WSO2 Identity Server suppor
126126

127127
{!./includes/db-config-table.md !}
128128

129-
129+
### Driver-Level Timeouts (Recommended for Production)
130+
131+
{!./includes/driver-level-timeouts.md !}
132+
133+
#### Example: Oracle RAC database
134+
135+
```toml
136+
[database.identity_db]
137+
url = "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=DB_HOST1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=DB_HOST2)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=WSO2_IDENTITY_DB)))?oracle.net.CONNECT_TIMEOUT=10000&oracle.jdbc.ReadTimeout=60000"
138+
username = "..."
139+
password = "..."
140+
driver = "oracle.jdbc.OracleDriver"
141+
```
142+
143+
Learn more in [Oracle JDBC RAC URLs](https://docs.oracle.com/en/database/oracle/oracle-database/19/jjdbc/data-sources-and-URLs.html){: target="_blank"}.

en/identity-server/6.1.0/docs/deploy/change-to-oracle.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,18 @@ When the database owner is not the user used to connect to the database, specify
135135

136136
{!./includes/rollback-pending.md !}
137137

138+
### Driver-Level Timeouts (Recommended for Production)
139+
140+
{!./includes/driver-level-timeouts.md !}
141+
142+
#### Example: Oracle database
143+
144+
```toml
145+
[database.identity_db]
146+
url = "jdbc:oracle:thin:@//DB_HOST:1521/WSO2_IDENTITY_DB?oracle.net.CONNECT_TIMEOUT=10000&oracle.jdbc.ReadTimeout=60000"
147+
username = "..."
148+
password = "..."
149+
driver = "oracle.jdbc.OracleDriver"
150+
```
151+
152+
Learn more in [Oracle JDBC data sources & URLs](https://docs.oracle.com/en/database/oracle/oracle-database/19/jjdbc/data-sources-and-URLs.html){: target="_blank"}.

en/identity-server/6.1.0/docs/deploy/change-to-postgresql.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,20 @@ Apart from the basic configurations specified above, WSO2 Identity Server suppor
116116

117117
### Configure the connection pool to rollback pending transactions on connection return
118118

119-
{!./includes/rollback-pending.md !}
119+
{!./includes/rollback-pending.md !}
120+
121+
### Driver-Level Timeouts (Recommended for Production)
122+
123+
{!./includes/driver-level-timeouts.md !}
124+
125+
#### Example: PostgreSQL database
126+
127+
```toml
128+
[database.identity_db]
129+
url = "jdbc:postgresql://DB_HOST:5432/WSO2_IDENTITY_DB?connectTimeout=10&socketTimeout=60&tcpKeepAlive=true"
130+
username = "..."
131+
password = "..."
132+
driver = "org.postgresql.Driver"
133+
```
134+
135+
Learn more in [PostgreSQL JDBC connection parameters](https://jdbc.postgresql.org/documentation/use/#connection-parameters){: target="_blank"}.

en/identity-server/6.1.0/docs/deploy/change-to-remote-h2.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,20 @@ A sample configuration is given below.
140140

141141
### Configure the connection pool to rollback pending transactions on connection return
142142

143-
{!./includes/rollback-pending.md !}
143+
{!./includes/rollback-pending.md !}
144+
145+
### Driver-Level Timeouts (Recommended for Production)
146+
147+
{!./includes/driver-level-timeouts.md !}
148+
149+
#### Example: Remote H2 database
150+
151+
```toml
152+
[database.identity_db]
153+
url = "jdbc:h2:tcp://localhost/~/WSO2_IDENTITY_DB;QUERY_TIMEOUT=60000"
154+
username = "..."
155+
password = "..."
156+
driver = "org.h2.Driver"
157+
```
158+
159+
Learn more in [H2 connection settings](http://www.h2database.com/html/features.html#connection_settings){: target="_blank"}.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
If the database becomes unresponsive, WSO2 Identity Server threads can get stuck waiting for a JDBC connection. This happens because the Tomcat JDBC Pool can't abort connection creation by itself ([source](https://github.com/apache/tomcat/blob/9.0.82/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java#L693-L702){: target="_blank"}).
2+
3+
To prevent this, configure **driver-level timeouts** in the JDBC URL:
4+
5+
- **`connectTimeout`** → Maximum time to wait while establishing a database connection.
6+
- **`socketTimeout`** (or driver-specific equivalent) → Maximum time to wait for responses on an active connection.
7+
- **`tcpKeepAlive=true`** (if supported) → Helps detect unresponsive database servers.
8+
9+
Also note the distinction:
10+
11+
- **`maxWait`** (Tomcat pool) controls how long to wait for a free connection from the pool.
12+
- **`connectTimeout` / `socketTimeout`** (driver) → how long to connect/read at the DB level.
13+
14+
> **Note:** The `PoolExhaustedException` warning log is logged only when `maxWait` expires ([source](https://github.com/apache/tomcat/blob/9.0.82/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java#L739-L741){: target="_blank"}). It does **not** cover delays inside the driver’s connection or read operations. Driver-level timeouts are required to handle those cases.

0 commit comments

Comments
 (0)