[midPoint] TaskSynchronizer possible issue

Pavol Mederly mederly at evolveum.com
Fri May 3 12:38:40 CEST 2019


Hello Nicolas,

I am afraid you are right in your idea: there could be tasks closed in 
midPoint repository but still marked as "running" in Quartz.

Maybe the synchronizer could be rewritten to be less memory intensive. 
But, honestly, I did not expect there could be an environment with 
14.000 tasks. :)

What are these? Are they approval tasks? Why are they so many?

In the near future (4.0) we will stop using tasks for approvals, so this 
problem will go away by itself.

Best regards,

Pavol Mederly
Software developer
evolveum.com

On 01.05.2019 0:46, Nicolas Rossi wrote:
> Hi guys, we have found that MP can fail to start due to memory issues 
> if there are a lot of tasks in the db. Looking at the logs we found 
> that Quartz queries all the tasks on the database and then iterates 
> over each one when it is initialized. That process was eating the 
> memory on our environment with 14.000 tasks.
>
> I modified the TaskSynchronizer 
> <https://github.com/Evolveum/midpoint/blob/b08206d0c0e5b3c6a7155bf7d8addbfee4672236/repo/task-quartz-impl/src/main/java/com/evolveum/midpoint/task/quartzimpl/execution/TaskSynchronizer.java#L97>class 
> to filter closed tasks on the 'synchronizeJobStores' method and it 
> fixed the problem. Is there any reason to get all tasks on this 
> process ? Maybe because some task can be closed on the db and running 
> in memory ?
>
> I can create a PR on github if you agree with this change.
>
> Any thoughts?
>
>
>
>
> Ing Nicolás Rossi
> Identicum S.A.
> Jorge Newbery 3226
> Oficina: +54 (11) 4552-3050
> Móvil: +54 (911) 6041-3920
> www.identicum.com <http://www.identicum.com>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20190503/70fc15e5/attachment.htm>


More information about the midPoint mailing list