We have a long run environment to playback selenium scripts. The command to start the remote server is as the following.
java -Xdump:java:events=user -jar -Djava.util.logging.config.file=/opt/my/logging.properties /opt/my/selenium-server-standalone-reduced-2.47.1.jar -timeout 3600 -browserTimeout 3600
Find that the real memory consumption of this process keeps growing over time.
The heap dump of the selenium server process shows that the class "java.lang.ApplicationShutdownHooks", loaded by "", occupies 97,222,648 (93.28%) bytes.
And there are large number of org.openqa.selenium.io.TemporaryFilesystem$1 objects (159724 in my case) dominated by class "java.lang.ApplicationShutdownHooks" and keeps growing over time.

I simply took a look at the source code of class
org.openqa.selenium.io.TemporaryFilesystem, only found that
shutdownHooks are added and no removeShutdownHook is called.
line 62: Runtime.getRuntime().addShutdownHook(shutdownHook),
And looks like shutdownHooks are only removed when stopping the Jetty server.
...
/**
Stops the Jetty server
*/
public void stop() {
int numTries = 0;
Exception shutDownException = null;
// this may be called by a shutdown hook, or it may be called at any time
// in case it was called as an ordinary method, try to clean up the shutdown
// hook
try {
if (shutDownHook != null) {
Runtime.getRuntime().removeShutdownHook(shutDownHook);
}
} catch (IllegalStateException ignored) {
} // thrown if we're shutting down; that's OK
...
Can anyone help me out. Thanks!
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/601e1986-c7e3-40f5-87b6-9cb497135bb6%40googlegroups.com.