You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Seifert (JIRA)" <ji...@apache.org> on 2017/11/30 20:00:08 UTC

[jira] [Commented] (SLING-7281) Sling query doesn't release referenced resources

    [ https://issues.apache.org/jira/browse/SLING-7281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16273306#comment-16273306 ] 

Stefan Seifert commented on SLING-7281:
---------------------------------------

does the problem also occur when you use only sling query and not fsresource?

please keep in mind that fsresource was designed primary for making development easier, it was never tested for "heavy production usage" with serving lots of thousands or more nodes through it. there is also a simple in-memory cache integrated. this cache is limited by default to 10,000 entries - you might experiment with different values to see if has an effect. it is configurable via the "Apache Sling File System Resource Provider" configuration.

> Sling query doesn't release referenced resources
> ------------------------------------------------
>
>                 Key: SLING-7281
>                 URL: https://issues.apache.org/jira/browse/SLING-7281
>             Project: Sling
>          Issue Type: Bug
>            Reporter: Bart Wulteputte
>         Attachments: Screen Shot 2017-11-30 at 16.30.33.png, Screen Shot 2017-11-30 at 18.19.07.png
>
>
> We were using slingquery 3.0.0 and fsresource 2.1.8. I'm not sure if fsresource actually has anything to do with it, but I'm just adding the info to be complete.
> The exact call done is : $(pageResource).searchStrategy(SearchStrategy.DFS).find("[expiryDate]");
> The goal was to look for subresources under pageResource which contains a property which should be taken into account to do another action. However, what we see is that items are traversed and never released. Something that contains a <50 nodes starts eating up more and more of the heap without ever releasing any references. As you can see from the visualVM screen, we chew through 16GB of heap in less than half an hour
> I'm unsure how to deliver a reproducible case without disclosing customer production data. My suspicion is that if you create a decent tree of nodes and keep invoke the query statement X times you'll be able to see something similar. In our case, we have a job which runs every minute and runs this query for X items each time.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)