Troubleshooting
This guide maps common local and production symptoms to the first checks that usually matter.
RC Rollout Abort
During the 1.0.0-rc.1 rehearsal, stop the canary when session or checkout
errors exceed 1%, PostgreSQL connection errors or unexpected SQLSTATEs exceed
0.1%, p95 latency is more than 25% above baseline and over 250 ms, checkout
wait p95 exceeds 100 ms, or /readyz returns 503 for more than two
consecutive probes. These are release abort thresholds, not capacity targets.
Keep the original PostgreSQL endpoint available while investigating. Restore it by reverting the application connection string, or restore the prior immutable pg-kinetic image tag and Helm chart version. Capture redacted logs, SQLSTATEs, probe responses, metrics, and admin snapshots before tearing down the failed canary.
Client Cannot Connect
Check the listener and TLS/auth mode first:
cargo run -p pg-kinetic -- --config-file pg-kinetic.toml
Then verify:
listen_addris bound to the expected interface and portclient_tls_modematches the client'ssslmodeorPGSSLMODEauth_modematches the expected authentication pathauth_users_fileexists when local auth is enabled- firewall, container port, or Kubernetes service rules expose the listener
For local plaintext psql checks, set PGSSLMODE=disable.
Backend Checkout Times Out
Inspect pool and route pressure:
SHOW POOLS;
SHOW BACKPRESSURE;
SHOW LIMITS;
Then check:
max_backendsis high enough for the workloadmax_route_in_flightis not too low for one route- backend PostgreSQL accepts new connections
- slow queries are not occupying every backend
- route health is not forcing all reads back to the primary
Read Traffic Does Not Reach Replicas
Confirm the query is safe to route:
- read routing is enabled for the route
- the SQL is classified as read-only or has an explicit replica hint
- the session did not recently write data that requires primary freshness
- replica lag is within
max_replica_lag_ms - fallback policy is not forcing primary
Use:
cargo run -p pg-kinetic -- route-preview --config pg-kinetic.toml --database app --user app --sql "select * from accounts"
Shard Is Not Selected
Shard extraction is conservative. A query may route to the primary/default shard when:
- the shard key is missing
- the predicate is too complex
- bind values cannot be matched safely
- multi-shard behavior is not allowed
- a policy override changes the target
Use Sharding Guide and route-preview to inspect the decision.
Prepared Statement Errors
Prepared statement behavior depends heavily on the client driver. Check:
- whether the driver uses named or unnamed statements
- whether the statement was closed or invalidated
- whether a backend reset dropped backend-local statement state
- whether a failed transaction left the backend pinned
Run the compatibility smoke for the affected language:
cargo run -p pg-kinetic -- compat run --target pg-kinetic --smoke
Docs Build Fails
Run the docs build from the repo root:
npm.cmd --prefix docs-site run build
Broken links fail the build. Prefer relative markdown links for docs in docs/, and keep generated/private workflow material out of the public tree.
Windows Build Runs Out Of Resources
If a broad Rust workspace test fails with MSVC or linker resource errors, retry serially:
$env:CARGO_BUILD_JOBS='1'
cargo test --workspace -j 1
This is slower but avoids parallel linker pressure on constrained Windows machines.