Few months back, one of the performance testing team in the hospitality industry encountered OutOfMemoryError during the endurance runs at the end of 2 hours. They repeated the endurance run again, but the end result was same. Without a second thought, the performance testing team increased the heap to 8 GB from the existing 4 GB. This time the OutOfMemoryError had occurred at the end of 4 hours.
About the application: The AUT (Application under test) was very simple, users login into the system and does 3000 iterations of invoking a static page and then logs out.
Requirements: At any given point of time 8000 users have to be logged into the system. There are around 100K users available in the system
Analysis: Ideally there should not be any problem with such simple applications. Knowing this team for a while, asked them few questions:
- What does the application perform?
- How the users login and what does the user do?
- Will the same users logins into the system or a new user logins every time?
Based on the responses provided by the team, came to a conclusion that the session is not getting in-validated when the user logs out.
Looked at the Session Keep-Alive time and found that this value has been configured to 24 hours.
After reducing the Session Keep-Alive time to 30 minutes, the OutOfMemoryError has been resolved even without looking at the heapdump (lots of time has been saved!!).
Conclusion: As a performance tester, very first thing is understand the application behavior. Never change the values without fully understanding the impact of the change.