---
title: "Configure HikariCP for Spring Boot on Red Hat OpenShift 4"
description: "HikariCP's default settings can leave Spring Boot apps on OpenShift 4 with exhausted or hung database connections."
url: "https://swe.quest/articles/configure-hikaricp-for-spring-boot-on-red-hat-openshift-4-3a25ad3cfb278c99"
canonical: "https://developers.redhat.com/articles/2026/11/20/configure-hikaricp-spring-boot-red-hat-openshift-4"
source: "Red Hat Developer"
published: "2026-11-20"
difficulty: "medium"
kind: "How-to"
reading_minutes: 9
tags: ["jvm","databases","kubernetes","resilience","debugging"]
---

# Configure HikariCP for Spring Boot on Red Hat OpenShift 4

A post on [Red Hat Developer](https://swe.quest/sources/red-hat-developers.md), published 2026-11-20, 9 min read, How-to. Original: [https://developers.redhat.com/articles/2026/11/20/configure-hikaricp-spring-boot-red-hat-openshift-4](https://developers.redhat.com/articles/2026/11/20/configure-hikaricp-spring-boot-red-hat-openshift-4)

## Summary

HikariCP's default settings can leave Spring Boot apps on OpenShift 4 with exhausted or hung database connections. The guide covers configuration through properties, YAML and a Java DataSource bean, then walks through five production failure modes. The first is Hikari's single connection-adder thread blocking forever on a socket read after a network drop, caught with a jcmd-based liveness probe that restarts the pod. The others are egress, NetworkPolicy and DNS problems; replica counts multiplying total connections against database limits; misaligned timeouts, fixed by setting keepaliveTime and keeping maxLifetime below load balancer and firewall idle timeouts; and CFS CPU throttling starving Hikari's housekeeping threads. Leak detection thresholds and Prometheus metrics such as hikaricp\_connections\_pending help with troubleshooting.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Java & JVM](https://swe.quest/tags/jvm.md) (Languages)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)
- [Kubernetes](https://swe.quest/tags/kubernetes.md) (Infrastructure)
- [Resilience](https://swe.quest/tags/resilience.md) (Distributed systems)
- [Debugging](https://swe.quest/tags/debugging.md) (Engineering practices)

## Prerequisites

- Spring Boot configuration ([easy posts on Configuration management](https://swe.quest/tags/configuration.md?difficulty=easy))
- JDBC connection pooling
- Kubernetes liveness probes ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))
- Java thread dumps ([easy posts on Java & JVM](https://swe.quest/tags/jvm.md?difficulty=easy))

## Keywords

HikariCP, Spring Boot, Red Hat OpenShift, jcmd, Prometheus, PostgreSQL, CFS

## Related posts

- [Clouds, caches and connection conundrums](https://swe.quest/articles/clouds-caches-and-connection-conundrums-9abdd4ad0c3450ff.md): incident.io · 2023-09-26 · Medium · 10 min read · Kubernetes, Networking, Incidents & postmortems, Debugging, PostgreSQL
  After migrating to Google Cloud, sporadic Postgres and memcached connection timeouts on GKE turned out to be node-wide, not process-local.
- [Performance testing: Where benchmarks meet reality](https://swe.quest/articles/performance-testing-where-benchmarks-meet-reality-64462392d8b5fb7d.md): Red Hat Developer · 2026-11-27 · Medium · 4 min read · Kubernetes, Performance engineering, Testing, Networking
  Kube-burner performance tests on a customized OpenShift cluster showed that cluster-density workloads met expectations, but node-density tests had unusually high PodInitialized latency even though scheduling looked healthy.
- [Incident Report: April 23rd, 2025](https://swe.quest/articles/incident-report-april-23rd-2025-f0e6e4113e1badba.md): Railway · 2025-04-23 · Medium · 4 min read · Incidents & postmortems, Resilience, PostgreSQL, Networking, Caching
  A Google Cloud SQL maintenance window took Railway's networking control plane Postgres read replica offline for about 10 minutes, destabilizing edge, private networking and TCP proxy traffic across all regions, worst in Asia.
- [The Vanishing Thread and Postgresql TCP Connection Parameters](https://swe.quest/articles/the-vanishing-thread-and-postgresql-tcp-connection-parameters-955a883b4bb1ed12.md): Instacart Tech · 2022-04-15 · Medium · 16 min read · PostgreSQL, Networking, Linux, Resilience, Debugging
  Instacart traced Puma threads that hung for about 15 minutes, ignoring application and database timeouts, to TCP retransmission storms between the app and an AWS NLB in front of PgBouncer.
- [Thundering herd of circuit breakers](https://swe.quest/articles/thundering-herd-of-circuit-breakers-b2ab1d42eebffb68.md): Zalando Engineering · 2026-10-07 · Medium · 9 min read · Resilience, Incidents & postmortems, Observability, Kubernetes, Capacity planning
  A client's circuit breaker stayed open for hours because its half-open probes hit a service that the HPA had scaled down to three pods.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
