Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AEM session object not garbaged collected

For the past month I've been dealing with a AEM 6.0 production site that after a week or so needs a restart of the instance. In this particular case it is my publisher that is failing. So I looked into it further more and found that everything works great at first then after a few days the garbage collection goes crazy so CPU utilization increases like crazy. From there I restarted my publisher and waited to get a heap dump when the GC went wacky again and analysed it with MAT (Memory Analyser Tool from eclipse). After my inspection I found that 94 % of the heap is occupied by a ConcurrentHashMap. I dove into that object and found that Sessions are the issue at hand or at least one of the main problems. The session-timeout value is 0, so no timeout on sessions. My error logs shows this type of message:

*WARN* [ip [1432319636774] GET something HTTP/1.1] org.apache.jackrabbit.oak.jcr.session.RefreshStrategy This session has been idle for 2 minutes and might be out of date. Consider using a fresh session or explicitly refresh the session. 

Is it possible to configure the session manager in AEM ? Has anyone seen this in AEM before ? Should I set the session-timeout to 1 or some value in particular ? Any suggestions would be welcome to know how I should proceed to solve this issue ?

Thanks

like image 402
nabello Avatar asked Nov 10 '22 12:11

nabello


1 Answers

This is a known Oak issue, which was mostly fixed with Oak 1.0.12. Consider installing service pack 2 for AEM 6.0 with the latest hotfixes on top of it if possible. You should plan also some migration time if you have lib overlays, but the effort for updating in comparison to the daily troubles caused by the software is minimal. You can find the latest AEM hotfixes here or in the package share.

If you can't install service pack 2, than consider installing all available Oak hotfixes. There are also several new oak:index packages you need to install.

like image 129
d33t Avatar answered Nov 14 '22 23:11

d33t