Derby
  1. Derby
  2. DERBY-5375

Memory "leak" when setting a query timeout

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 10.8.1.2
    • Fix Version/s: None
    • Component/s: JDBC
    • Urgency:
      Normal
    • Bug behavior facts:
      Seen in production

      Description

      When setting a query timeout, a new CancelQueryTask is created and scheduled. This CancelQueryTask is still held in the java.util.Timer class's task queue even when the query is already finished until the query timeout is reached.

      For example, if i set a query timeout of 2h using statement.setQueryTimeout(7200) this means that the CancelQueryTask will remain for 2 hours even if the query is finished within 1 second. In scenarios with high load, this can lead to Out of Memory Situations.

        Issue Links

          Activity

          Thomas Brandl created issue -
          Knut Anders Hatlen made changes -
          Field Original Value New Value
          Link This issue relates to DERBY-4137 [ DERBY-4137 ]
          Dag H. Wanvik made changes -
          Bug behavior facts [Seen in production]
          Mamta A. Satoor made changes -
          Labels derby_triage10_9
          Gavin made changes -
          Workflow jira [ 12626321 ] Default workflow, editable Closed status [ 12801731 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Thomas Brandl
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development