Title: Connection Pool Leak in Out-of-Band Management (OOB) background task causes Management Server crash (HikariPool MaxActive Exhaustion) · Issue #13382 · apache/cloudstack · GitHub
Open Graph Title: Connection Pool Leak in Out-of-Band Management (OOB) background task causes Management Server crash (HikariPool MaxActive Exhaustion) · Issue #13382 · apache/cloudstack
X Title: Connection Pool Leak in Out-of-Band Management (OOB) background task causes Management Server crash (HikariPool MaxActive Exhaustion) · Issue #13382 · apache/cloudstack
Description: problem We are experiencing a critical connection leak in Apache CloudStack 4.22.1.0 (running on Ubuntu 24.04). The background task for Out-of-Band Management (OOBM) leaks database connections every time it executes. Even when setting wa...
Open Graph Description: problem We are experiencing a critical connection leak in Apache CloudStack 4.22.1.0 (running on Ubuntu 24.04). The background task for Out-of-Band Management (OOBM) leaks database connections ever...
X Description: problem We are experiencing a critical connection leak in Apache CloudStack 4.22.1.0 (running on Ubuntu 24.04). The background task for Out-of-Band Management (OOBM) leaks database connections ever...
Opengraph URL: https://github.com/apache/cloudstack/issues/13382
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Connection Pool Leak in Out-of-Band Management (OOB) background task causes Management Server crash (HikariPool MaxActive Exhaustion)","articleBody":"### problem\n\nWe are experiencing a critical connection leak in Apache CloudStack 4.22.1.0 (running on Ubuntu 24.04). The background task for Out-of-Band Management (OOBM) leaks database connections every time it executes.\n\nEven when setting wait_timeout on MySQL server side or trying to inject pool properties, the connections remain blocked within the Java application state as active, eventually hitting the db.cloud.maxActive threshold (default 250), which causes the management server to stop responding and throw SQLTransientConnectionException.\n\n### versions\n\nCloudStack Version: 4.22.1.0\nOS: Ubuntu 24.04.4 LTS\nDB: MySQL 8.0.45\nJava Version: 17.0.19\n\n### The steps to reproduce the bug\n\n1. Configure Out-of-Band Management (OOBM) for multiple physical hosts\n2. Set outofbandmanagement.background.task.execution.interval to a lower value for testing purposes (e.g., 60 or 300 to accelerate the leak\n3. Monitor the MySQL SHOW FULL PROCESSLIST; vs. the CloudStack Management Server Metrics over time.\n...\n\n\n### What to do about it?\n\nEvery time the OOBM task runs, it opens 1 connection per configured host (3 connections in total for our setup). These connections are never returned to the HikariCP pool (missing .close() or unhandled exception block in the OOBM plugin execution layer).\n\nThe Mismatch between DB and Java Pool:\n\nMySQL Side: Sells connections as Sleep. If MySQL kills them via wait_timeout, the sockets are closed on the network layer.\n\nCloudStack/HikariCP Side: Because the leaked connections are still flagged as active (In-Use) by the OOBM thread, HikariCP never runs a health check on them and refuses to evict them via maxLifetime. The internal counter stays at active=250.\n\nOnce the counter hits 250, the management server crashes.\n\nLogs \u0026 Error Stacktrace:\n\n2026-06-08 21:14:28,070 ERROR [c.c.s.S.ManagementServerCollector] (StatsCollector-1:[ctx-fd90ba07]) (logid:182faa68) Error trying to retrieve management server host statistics com.cloud.utils.exception.CloudRuntimeException: Unable to find on DB, due to: cloud - Connection is not available, request timed out after 30000ms (total=250, active=250, idle=0, waiting=22)\n\nIs there any workaround available? Maybe switching to dbcp?","author":{"url":"https://github.com/mortenstevens","@type":"Person","name":"mortenstevens"},"datePublished":"2026-06-09T08:55:00.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/13382/cloudstack/issues/13382"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4a8c28bc-e10b-611c-5a18-b604b3ce92d5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D74E:2007B4:3B2191:510E79:6A4D5D23 |
| html-safe-nonce | 7831250443df1ba8c5084b7265698db01dbd4fd617be6b7de6cdb581e54bbe06 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzRFOjIwMDdCNDozQjIxOTE6NTEwRTc5OjZBNEQ1RDIzIiwidmlzaXRvcl9pZCI6Ijc3NDk3NTUyMTMwNTM3NzkyMzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e777d17b0d7ded60a461f714c2cb159a92ba11f151a583acbe280445cf5a326e |
| hovercard-subject-tag | issue:4620473844 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/apache/cloudstack/13382/issue_layout |
| twitter:image | https://opengraph.githubassets.com/523923413b92cda4f36aa515e2232473ac3c631f695892fcfee05c35fe9fcf0b/apache/cloudstack/issues/13382 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/523923413b92cda4f36aa515e2232473ac3c631f695892fcfee05c35fe9fcf0b/apache/cloudstack/issues/13382 |
| og:image:alt | problem We are experiencing a critical connection leak in Apache CloudStack 4.22.1.0 (running on Ubuntu 24.04). The background task for Out-of-Band Management (OOBM) leaks database connections ever... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mortenstevens |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2a1443ff9733a3016431263ea73c93d8fe00c195eb4a7670ac30e7848f045441 |
| turbo-cache-control | no-preview |
| go-import | github.com/apache/cloudstack git https://github.com/apache/cloudstack.git |
| octolytics-dimension-user_id | 47359 |
| octolytics-dimension-user_login | apache |
| octolytics-dimension-repository_id | 9759448 |
| octolytics-dimension-repository_nwo | apache/cloudstack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 9759448 |
| octolytics-dimension-repository_network_root_nwo | apache/cloudstack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f3bdd3157ea1f0fd738d408eceeead721acf1dc3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width