Selenium server not releasing memory causing java.lang.OutOfMemoryError: Java heap space

437 views
Skip to first unread message

Peter

unread,
Jan 14, 2015, 11:30:29 PM1/14/15
to seleniu...@googlegroups.com
So basic problem is that the JVM slowly eats up memory as more commands are executed by the server. My python script is performing a few hundred page loads (most of the work is just clicking through to some deep page of a website over and over for testing). It feels as though the selenium server is not releasing memory as it should be as I expect that opening up a few hundred pages should not cause the selenium server to run out of memory, but rather use a constant amount of memory (especially since it is loading up the same pages 90% of the time).

The only way I've found of getting the memory back from the selenium server is to shut it down and restart it.

It looks like this problem has been encountered by selenium users before, but without a proper resolution.


I'm running HTMLUnit as the browser (as this is running on a linux server).

Selenium server 2.44.0

java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

10:59:01.595 WARN - Exception thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
 Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:02:37'
 System info: host: ...', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-279.22.1.el6.x86_64', java.version: '1.7.0_51'
 Driver info: driver.version: unknown
         at java.util.concurrent.FutureTask.report(FutureTask.java:122)
         at java.util.concurrent.FutureTask.get(FutureTask.java:188)
         at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:175)
....
 Caused by: java.lang.OutOfMemoryError: Java heap space
         at java.lang.reflect.Method.getParameterTypes(Met...

----------------------------------------------


Has anybody been able to find a good workaround for this issue?
Reply all
Reply to author
Forward
0 new messages