This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 241142

Summary: OutOfMemoryError: com.mysql.jdbc.ByteArrayRow uses excessive heap
Product: db Reporter: kwoodle
Component: Show DataAssignee: matthias42
Status: RESOLVED FIXED    
Severity: normal CC: kaznovac
Priority: P3    
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 207107
Attachments: stacktrace

Description kwoodle 2014-01-30 00:04:25 UTC
Build: NetBeans IDE 7.4 (Build 201310111528)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.21-b01, Java(TM) SE Runtime Environment, 1.7.0_21-b11
OS: Windows 7

User Comments:
kwoodle: don't remember




Stacktrace: 
java.lang.OutOfMemoryError: GC overhead limit exceeded
   at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1528)
   at java.lang.ClassLoader$1.run(ClassLoader.java:494)
   at java.lang.ClassLoader$1.run(ClassLoader.java:492)
   at java.security.AccessController.doPrivileged(AccessController.java:0)
   at java.lang.ClassLoader.checkPackageAccess(ClassLoader.java:492)
   at org.netbeans.modules.sampler.InternalSampler.createInternalSampler(InternalSampler.java:83)
Comment 1 kwoodle 2014-01-30 00:04:30 UTC
Created attachment 144562 [details]
stacktrace
Comment 2 Tomas Hurka 2014-01-31 13:31:34 UTC
OOME is cause by processing select statement, which returns a lot of results.
Retained size of java.util.ArrayList#13700 is 750M and this ArrayList contains 2032797 instances of com.mysql.jdbc.ByteArrayRow
Comment 3 Tomas Hurka 2014-02-06 13:34:33 UTC
*** Bug 241449 has been marked as a duplicate of this bug. ***
Comment 4 matthias42 2014-10-06 21:58:54 UTC
*** Bug 243450 has been marked as a duplicate of this bug. ***
Comment 5 matthias42 2015-03-15 19:14:57 UTC
Ok - I reevaluated the "scrollable cursor support". It turns out, that the first evaluation was done with to small tables. Basicly none of the tested drivers supports big tables well when scrollable cursors are requested:

- postgresql + mysql both flood the heap (mysql can be fixed with useCursorFetch property, but it is then slow)
- derby is slow

So my advice: If you encounter problems with existing connections, check the state of "Use scrollable cursors" if checked, uncheck it and test again.

I disabled scrollable cursor support by default for now (works only for new connections):

http://hg.netbeans.org/core-main/rev/846850870fab

Please see if the above explanation helps. If so, please change the state of this bug from FIXED to VERIFIED.