You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/integrations/language-clients/java/jdbc-v2.md
+50-1Lines changed: 50 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,7 +181,56 @@ try (HikariDataSource ds = new HikariDataSource(poolConfig);
181
181
}
182
182
```
183
183
184
-
185
184
## MoreInformation
186
185
For more information, see our [GitHub repository](https://github.com/ClickHouse/clickhouse-java) and [Client-V2 documentation](/docs/en/integrations/language-clients/java/client-v2.md).
186
+
187
+
188
+
## Troubleshooting
189
+
### Logging
190
+
The driver uses [slf4j](https://www.slf4j.org/) for logging, and will use the first available implementation on the classpath.
191
+
192
+
### ResolvingJDBCTimeout on LargeInserts
193
+
194
+
When performing large inserts in ClickHouse with long execution times, you may encounter JDBC timeout errors like:
195
+
196
+
```plaintext
197
+
Caused by:java.sql.SQLException:Read timed out, server myHostname [uri=https://hostname.aws.clickhouse.cloud:8443]
198
+
```
199
+
These errors can disrupt the data insertion process and affect system stability. To address this issue you may need to adjust a few timeout settings in the client's OS.
200
+
201
+
#### Mac OS
202
+
203
+
On Mac OS, the following settings can be adjusted to resolve the issue:
204
+
205
+
- `net.inet.tcp.keepidle`: 60000
206
+
- `net.inet.tcp.keepintvl`: 45000
207
+
- `net.inet.tcp.keepinit`: 45000
208
+
- `net.inet.tcp.keepcnt`: 8
209
+
- `net.inet.tcp.always_keepalive`: 1
210
+
211
+
#### Linux
212
+
213
+
On Linux, the equivalent settings alone may not resolve the issue. Additional steps are required due to the differences in how Linux handles socket keep-alive settings. Follow these steps:
214
+
215
+
1. Adjust the following Linux kernel parameters in `/etc/sysctl.conf` or a related configuration file:
216
+
217
+
- `net.inet.tcp.keepidle`: 60000
218
+
- `net.inet.tcp.keepintvl`: 45000
219
+
- `net.inet.tcp.keepinit`: 45000
220
+
- `net.inet.tcp.keepcnt`: 8
221
+
- `net.inet.tcp.always_keepalive`: 1
222
+
- `net.ipv4.tcp_keepalive_intvl`: 75
223
+
- `net.ipv4.tcp_keepalive_probes`: 9
224
+
- `net.ipv4.tcp_keepalive_time`: 60 (You may consider lowering this value from the default 300 seconds)
225
+
226
+
2. After modifying the kernel parameters, apply the changes by running the following command:
227
+
228
+
```shell
229
+
sudo sysctl -p
230
+
```
231
+
232
+
After Setting those settings, you need to ensure that your client enables the Keep Alive option on the socket:
0 commit comments