|
@@ -393,7 +393,16 @@ Rows already that large stay unreadable; the export names them `row_too_large`.
|
|
|
**false** when the server cannot be reached. Before 2.13.1 it returned true
|
|
**false** when the server cannot be reached. Before 2.13.1 it returned true
|
|
|
without opening anything, even against a dead port. On false the client is
|
|
without opening anything, even against a dead port. On false the client is
|
|
|
still usable (gRPC keeps reconnecting; calls report `Unavailable` meanwhile).
|
|
still usable (gRPC keeps reconnecting; calls report `Unavailable` meanwhile).
|
|
|
-With the server down, `connect()` now takes up to `timeoutMs`. `isConnected()`
|
|
|
|
|
|
|
+With the server down, `connect()` now takes up to `timeoutMs`.
|
|
|
|
|
+
|
|
|
|
|
+**⚠ Check any loop that retries `connect()`.** A loop bounded by an attempt
|
|
|
|
|
+count - `for (i = 0; i < 30 && !db.connect(); ++i) sleep(1s);` - cost about 30 s
|
|
|
|
|
+before 2.13.1 and costs up to 30 x (timeoutMs + 1 s) = 180 s with the default
|
|
|
|
|
+5 s timeout. Under systemd that can outrun `TimeoutStartSec` (90 s is common),
|
|
|
|
|
+so a service started while the database is down - which a package postinst does
|
|
|
|
|
+on every upgrade - is killed mid-start instead of exiting cleanly. Bound such a
|
|
|
|
|
+loop by a wall-clock deadline, not an attempt count (found by
|
|
|
|
|
+smartbotic-vectorapi in its own units). `isConnected()`
|
|
|
is the channel's last known state, not a live probe: use `healthCheck()` for
|
|
is the channel's last known state, not a live probe: use `healthCheck()` for
|
|
|
"is the database answering now".
|
|
"is the database answering now".
|
|
|
|
|
|