Our framework uses Selenium 3.14 Java. Whenever we encounter memory issues, heap dump gets generated. In mostly all the heap dumps, we see 1 leak suspect as "java.util.logging.Logger", loaded by "<system class loader>"
In heap dumps, it mostly shows around 30% of memory occupied due to java util logging logger.
Our framework uses slf4j for logging and not the above mentioned jar. Also, in the details, we see that these refer to Selenium internal calls - as shown below:
Forwarding switchToFrame on session 5f78a9ebb6b8f5d88a8d76dcb3658b4b to remote
or
Forwarding screenshot on session f71d2aa39d7b89ceaacfb0422598c64d to remote
There are some others as well. How can we minimize the memory usage for these processes? Also, we are upgrading to Selenium 4 soon. Is this issue of more memory consumption due to logging - resolved in Sel 4?