Title: Queue.take in SQLPool can produce deadlock · Issue #58 · JavaWebStack/orm · GitHub
Open Graph Title: Queue.take in SQLPool can produce deadlock · Issue #58 · JavaWebStack/orm
X Title: Queue.take in SQLPool can produce deadlock · Issue #58 · JavaWebStack/orm
Description: Describe the Bug In SQLPool we use take on the queue to wait for a connection to become available. If no connections become available (for example if a single thread is using up all connections) it produces a deadlock causing a lockup of...
Open Graph Description: Describe the Bug In SQLPool we use take on the queue to wait for a connection to become available. If no connections become available (for example if a single thread is using up all connections) it...
X Description: Describe the Bug In SQLPool we use take on the queue to wait for a connection to become available. If no connections become available (for example if a single thread is using up all connections) it...
Opengraph URL: https://github.com/JavaWebStack/orm/issues/58
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Queue.take in SQLPool can produce deadlock","articleBody":"**Describe the Bug**\r\nIn SQLPool we use take on the queue to wait for a connection to become available. If no connections become available (for example if a single thread is using up all connections) it produces a deadlock causing a lockup of the entire application since all database queries will run into a deadlock\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. Set the pool size to 1\r\n2. Call get once\r\n3. Call get a second time -\u003e gets stuck\r\n\r\n**Expected behavior**\r\nThe pool should use poll instead and throw an Exception after a reasonable amount of waiting time preventing a lockup of the entire application\r\n\r\n**Environment Information:**\r\n - Java Language Level 8\r\n - Version 1.0.3\r\n\r\n**Additional Context**\r\nThe root cause of this might be a different issue since the pool shouldn't have ran out of connections in the first place. We can check this issue once proper exceptions are thrown.\r\n","author":{"url":"https://github.com/JanHolger","@type":"Person","name":"JanHolger"},"datePublished":"2024-11-14T14:01:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/58/orm/issues/58"}
| 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:c3928818-a54c-7d7b-ae6f-87220dbed1a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 827E:34FBA0:70BC2:9D9FB:697CB877 |
| html-safe-nonce | 85570c6bc84f0174e6d2ebab429dd3d98d5ee426627e9766ff0bef4d9e96d690 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjdFOjM0RkJBMDo3MEJDMjo5RDlGQjo2OTdDQjg3NyIsInZpc2l0b3JfaWQiOiI2MDAwNTA0NzUzOTk0MjgyMTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2f1b90daa1e2472505997536bb25af2272506c8a74fb45281dea6defd3ae44c4 |
| hovercard-subject-tag | issue:2658913086 |
| 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/JavaWebStack/orm/58/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0fff26ea91bf51fa2f3dc9694415376070c0ed53db16c3cb70e732e762fef3f9/JavaWebStack/orm/issues/58 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0fff26ea91bf51fa2f3dc9694415376070c0ed53db16c3cb70e732e762fef3f9/JavaWebStack/orm/issues/58 |
| og:image:alt | Describe the Bug In SQLPool we use take on the queue to wait for a connection to become available. If no connections become available (for example if a single thread is using up all connections) it... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JanHolger |
| hostname | github.com |
| expected-hostname | github.com |
| None | f30e23787c843d478679169eb69bc1bf04c9aaf526e14cad93570a516ad7b047 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaWebStack/orm git https://github.com/JavaWebStack/orm.git |
| octolytics-dimension-user_id | 73674659 |
| octolytics-dimension-user_login | JavaWebStack |
| octolytics-dimension-repository_id | 308479502 |
| octolytics-dimension-repository_nwo | JavaWebStack/orm |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 308479502 |
| octolytics-dimension-repository_network_root_nwo | JavaWebStack/orm |
| 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 | 741eb70fda44f52186d2172f41929617819039d5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width