We faced few memory issues while running our test suites in KSE, mostly after ~15 TC runs after upgrading our Android application to AndroidX[Updated with latest sdk’s]. The same scripts/test cases are working fine and stable in our non Android X version.
Following were the errors displayed:
- java.lang.OutOfMemoryError: GC overhead limit exceeded
2) java.lang.OutOfMemoryError: heap memory issue
In order to debug further, we did a memory profiling for both versions of application for the same scenario and following is attached here for your reference. Based on this, memory consumed by applications seems more similar.
Based on further investigations and research, we got a few insights from a community forum to increase Katalon memory in katalon.ini and to add launch arguments to clear GC by adding JVM parameters. Currently, we made changes according to that and restarted our execution to check further.
Changes made to katalon.ini:
Updated Xmx and Xms to following:
-
Xmx8192m
-
Xms1024m
Launch commands added in Katalon > Project settings:
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./java_pid.hprof -XX:+UseGCOverheadLimit
Our machine specification is as follows:
- 3.2GHz 6‑core 8th‑generation Intel Core i7 (Turbo Boost up to 4.6GHz)
- 16GB 2666MHz DDR4
- Intel UHD Graphics 630
- 128GB SSD storage
- Gigabit Ethernet (10/100/1000BASE-T Gigabit Ethernet using RJ-45 connector)
KSE, adb and Appium information:
- KSE version 7.5.5
- Appium 1.16.0
- Android Debug Bridge version 1.0.41
- Version 30.0.3-6597393
Note: We have tried with different versions of Katalon and Appium also, and the issue was still there.
We would appreciate it if you could share this finding with the team and let us know your feedback on this issue. As for our regression, we might be running more TC’s together and if this memory issue is happening again it would be a challenge for us.
Your findings will help us to identify whether we need to make some changes from our side(on application/Katalon) or we should await for a fix from your side.