Bug 1047269 - Memory leak when running a high number of solver phases
Summary: Memory leak when running a high number of solver phases
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: OptaPlanner
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: CR1
: 6.0.0
Assignee: Geoffrey De Smet
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-30 09:00 UTC by Geoffrey De Smet
Modified: 2014-08-06 20:16 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:16:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Geoffrey De Smet 2013-12-30 09:00:18 UTC
Tech: AcceptedForager doesn't clean up after itself in the phaseEnded() method.
As a result, the entire working solution of a phase can be kept in memory. When having a lot of phases (which is very unusual unless your result to partititioning) this hurts. In combination with a very big dataset (such as my xmas holiday hobby packing-santas-sleigh competition), this causes OutOfMemoryError.

Most (if not all) users use 2 or 3 solver phases, so the death of the Solver already releases that memory before it ever turns into a problem.

Testing the fix now on master. I suggest we backport this to 6.0.x as the fix is trivial and harmless.

Comment 2 Geoffrey De Smet 2013-12-30 09:02:10 UTC
Master fix:
  https://github.com/droolsjbpm/optaplanner/commit/3f408cf1c

Set the flags correctly if you want me to backport it to 6.0.x.

Comment 3 Geoffrey De Smet 2014-01-02 08:37:18 UTC
Fixed on 6.0.x too:
  http://github.com/droolsjbpm/optaplanner/commit/532ff438d

Comment 4 Lukáš Petrovický 2014-01-19 18:21:14 UTC
There is no test case. VERIFIED by looking at the code.


Note You need to log in before you can comment on or make changes to this bug.