Memory Leak Alfresco Process Services v1.9.0

cancel
Showing results for 
Search instead for 
Did you mean: 
axferreira
Member II

Memory Leak Alfresco Process Services v1.9.0

We're having an issue with Alfresco Activiti (Process Services v1.9.0) where the memory is reaching the JVM limit, CPU is usually below 10%. This is mostly happening when we make requests to the endpoint (/activiti-app/api/enterprise/tasks/query). Just wondering has anyone seen this issue before? Thanks in advance.

Config: -Xms8g -Xmx16g

References: hibernate-commons-annotations-4.0.2.Final hibernate-core-4.2.16.Final hibernate-entitymanager-4.2.16.Final hibernate-jpa-2.0-api-1.0.1.Final hibernate-jpa-2.0-api-1.0.1.Final hibernate-validator-5.3.6.Final

ndpoint: /activiti-app/api/enterprise/tasks/query Request Body: { "appDefinitionId": null, "sort": "created-desc", "size": 50, "start": 0, "text": "", "state": "completed" }

APS.png

 

1 Reply
afaust
Master

Re: Memory Leak Alfresco Process Services v1.9.0

I have not seen such a behaviour per-se, but have had other/different issues with high memory usage in APS 1.6 through 1.9.

You specify that this happens when you make requests to that particular endpoint. Is the retained memory set in your screenshot from only that thread, i.e. on the path to the root scope of that thread? By using the memory analysis tool you are using, did you check which specific entities are maintained in the context, just so that you could identify their origin? (I.e. whether they are all tasks as I would expect if they originate from that task query)

How many completed tasks do you have in general in your database? Please check via direct SQL and compare the number with the number of entities. APS should pre-select the queried tasks to be in relation to the current user, but it also performs some access checking after entities have been loaded, so if you have many tasks in the DB, it could be that they are loaded en-masse before they would be filtered down again.