[CONJ-276] java.lang.OutOfMemoryError: Java heap space Created: 2016-04-07  Updated: 2019-06-27  Resolved: 2016-04-08

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: 1.4.1
Fix Version/s: 1.4.2

Type: Bug Priority: Blocker
Reporter: Christian Bourque Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None
Environment:

WildFly 8.2.1 / 10.0.22-MariaDB openSUSE package


Issue Links:
Relates
relates to CONJ-715 OOM happening when querying large dat... Closed

 Description   

A simple count query on an empty table throws an exception:

java.lang.OutOfMemoryError: Java heap space

Same code/query was working perfectly fine with driver series 1.3.x!



 Comments   
Comment by Christian Bourque [ 2016-04-07 ]

I don't know if it's related to CONJ-275 but after upgrading to 1.4.2-SNAPSHOT it seems that the memory problem is gone but I still have a problem with some count queries...

Comment by Diego Dupin [ 2016-04-07 ]

That's strange, because 1.4.x version use a lot less memory.
The only memory increase is the the socket input buffer that is now 16kb (was 4k).

Can you provide any additional information about your environnement ? connection options, heap space, number of connections in pool, ...
If you have identified the query, that cause the problem, do you use statement/prepareStatement, fetch size ... ?

Comment by Diego Dupin [ 2016-04-07 ]

I didn't seen you comment before my reply.
The CONj-275 concern fetch size only. Did your count queries use fetch size ?

Comment by Christian Bourque [ 2016-04-07 ]

It seems that the problem is precisely related to the fetch size: if I set one the resultset will loop forever but if I don't set one the resultset behave correctly! I can provide a test case if you want...

Comment by Christian Bourque [ 2016-04-07 ]

With 1.4.1, I get the bug whenever I set the fetchSize to a value greater than 1! But the problem seems to be resolved in 1.4.2-SNAPSHOT! I'm still testing...

Comment by Christian Bourque [ 2016-04-08 ]

Ok I confirm that the issue is gone with version 1.4.2-SNAPSHOT!

Generated at Thu Feb 08 03:14:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.