You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Thomas Nielsen (JIRA)" <ji...@apache.org> on 2007/10/12 09:45:51 UTC

[jira] Commented: (DERBY-1781) Process handles appear to be leaking in queries using an IN clause during concurrent DB access

    [ https://issues.apache.org/jira/browse/DERBY-1781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534241 ] 

Thomas Nielsen commented on DERBY-1781:
---------------------------------------

The issue does not explicitly state, but I assume 1.5.0_05 where this was reported also was a Sun JVM.

I tried reproducing this issue on the main trunk, and with a few different Sun JVMs:
- 1.5.0_07
- 1.5.0_13
- 1.6.0_03 

I fired up a network server on each and ran the repro script using the same java version. The network server java process was monitored using the SysInternals "Process Explorer" (http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/ProcessExplorer.mspx)

While the repro runs I see the number of handles increasing, and they end at a higher level than at the start as indicated in the report. All JVMs follow the same pattern, but there's a tendency for newer JVMs to increase less (not verified!). Ballpark numbers on handle count for the network server java process is as follows:

Starting the network server: --> 350 handles. 
Running the script a few times gives:
1st run: --> 580
2nd run: --> 600
3rd run: --> 610

The large increase on the first run is most likely due to population.

I believe some more investigation is in order.


> Process handles appear to be leaking in queries using an IN clause during concurrent DB access
> ----------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1781
>                 URL: https://issues.apache.org/jira/browse/DERBY-1781
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.1.3.1
>         Environment: Windows XP, Java 1.5.0_05
>            Reporter: Mark Hellkamp
>         Attachments: SqlStressTest.java
>
>
> We are currently using Derby embedded in our web application running on Windows. When processing multiple concurrent requests we have noticed that the Java process handle count continues to increase until the machine becomes unresponsive. I was able to isolate the problem to Derby by running the database in network mode in another process. Further investigation showed that the problem could be reproduced using a select statement that has an IN clause with multiple entries on the primary key column. Spawning multiple threads running the same query causes the handle count to increase considerably on the Derby process. The problem occurs in version 10.1.3.1 and 10.2.1.1 (even worse) in both embedded and network mode. The attached test program duplicates the problem. Start Derby in network mode (using startNetworkServer.bat) and run the enclosed test program. The handle count on the Derby process will increase and never go down short of restarting Derby. Using 10.2.1.1 the handle count for the Derby process goes somewhere between 1400-1500 with just two threads in my environment. 

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