Session object build up in memory

Avatar

Avatar
Level 1
kiran_kms
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
kiran_kms
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
kiran_kms
Level 1

28-04-2020

Hi All,

 

We noticed that the Old Gen Heap memory is getting filled up in JVM of our AEM instances at regular intervals. As a result, our instances were going into high CPU utilization mode when GC was triggered. After analysis of the heap dump we found that there is a huge accumulation of session objects under “org.eclipse.jetty.server.session.SessionData”. Web Sessions are not being cleared from server runtime memory.

Our current site is only for logged-in users where the sign in is based on SSO. In the session we store the user information. It is created when user logs in and is invalidated when he logs off. We believe the session object pile up is because users don’t explicitly log-off, so the invalidate method is not called. We tried “Session Timeout” setting in “/system/console/configMgr” under 'Apache Felix Jetty Based Http Service”, but it does not help.

Any advice or inputs on this scenario is highly appreciated.

 

Thanks,

Kiran

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Seeker
MVP
Suraj_Kamdi
MVP

Likes

148 likes

Total Posts

164 posts

Correct reply

42 solutions
Top badges earned
Seeker
Bedrock
Engage 1
Springboard
Validate 1
View profile

Avatar
Seeker
MVP
Suraj_Kamdi
MVP

Likes

148 likes

Total Posts

164 posts

Correct reply

42 solutions
Top badges earned
Seeker
Bedrock
Engage 1
Springboard
Validate 1
View profile
Suraj_Kamdi
MVP

29-04-2020

@kiran_kms 

Try to update JVM heap size in start.bat file e.g

-Xms4G -Xmx4G -XX:MaxPermSize=1024M -XX:-UseSplitVerifier

 

Thanks and Regards,

Suraj Kamdi

 

 

Answers (1)

Answers (1)

Avatar

Avatar
Boost 5
Level 2
akhoury
Level 2

Likes

11 likes

Total Posts

15 posts

Correct reply

5 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Applaud 5
View profile

Avatar
Boost 5
Level 2
akhoury
Level 2

Likes

11 likes

Total Posts

15 posts

Correct reply

5 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Applaud 5
View profile
akhoury
Level 2

29-04-2020

If the Jetty Session Timeout isn’t helping then it might be something resetting the JSESSIONID cookie so a new session is generated per request.  You might debug if the value is changing per request.  Also, investigate your code to see if you even need JSP sessions. If you don’t, then disable it in your code or in the jetty config default setting.