db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3596) Creation of logical connections from a pooled connection causes resource leak on the server
Date Wed, 21 May 2008 14:51:56 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kristian Waagan updated DERBY-3596:
-----------------------------------

    Attachment: complex-fix-heap.png
                simple-fix-heap.png
                nofix-heap.png

Attaching three images showing the heap usage of the various builds: no fix, simple fix and
complex fix.
Note the left side axis, it is not the same across all the images!

I used the attached repro to measure performance, and JConsole to monitor heap usage.  I ran
the repro 10 times, each run lasting 30 seconds using Sun JDK 1.6.0 with default settings
on my dual core machine with 4 GB memory.

Number of iterations done by the repro;
 - no fix:       48 000 [25 - 56]
 - simple fix:   78 000 [70 - 79]
 - complex fix: 125 000 [120 - 128]

Note that the complex fix is not optimal, but feasible without changing
the client driver as well. I haven't verified, but I believe it should
work fine with older client versions. The simple fix keeps the semantics
unchanged.

> Creation of logical connections from a pooled connection causes resource leak on the
server
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3596
>                 URL: https://issues.apache.org/jira/browse/DERBY-3596
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client, Network Server, Performance
>    Affects Versions: 10.1.3.1, 10.2.2.0, 10.3.2.1, 10.4.1.3, 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>         Attachments: complex-fix-heap.png, ConnectionPoolingBug.java, derby-3596-1a-complex_approach.diff,
derby-3596-2a-simple_approach.diff, nofix-heap.png, simple-fix-heap.png
>
>
> When using ClientConnectionPoolDataSource and connection pooling, a new connection /
transaction is created for every new logical connection, and the resources are not freed /
cleaned up in the server. They are not even cleaned up when the physical connection (ClientPooledConnection)
is closed.
> A logical connection is obtained by invoking ClientPooledConnection.getConnection().
> I have observed that if you run the repro enough times against the same server, the number
of transaction in the transaction table will be reduced now and then. I believe this is garbage
collection, but I have not investigated the problem enough to tell for sure what's going on.
> I have also seen some locks not being freed, causing timeouts in some applications. I
don't have a repro for the lock problem at this time, but it is very likely related to this
issue.
> Note that XA connections are handled differently on the server, and do probably not have
this problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message