Selenium RC and OutOfMemory DevMode error

86 views
Skip to first unread message

Tristan

unread,
Mar 16, 2010, 1:01:27 AM3/16/10
to Google Web Toolkit
I started this in Google App Engine Java group, but as Ikai pointed
out, it probably belongs here. Does anyone have any hints for this
problem?

Tristan
-------
Hi,
I have Selenium RC hooked up and automated Selenium tests going using
JUnit. The problem is that after Selenium runs about 34 out of the 43
stories so far, my module complains that it is out of memory: [ERROR]
Out of memory; to increase the amount of memory, use the -Xmx flag at
startup (java -Xmx128M ...)

Every time a Selenium test case is run, it opens a new Safari window
and loads the page. I can see on the server (via eclipse) that it is
rebinding my RPC services every time, which is normal as far as I can
tell. And around 34 tests, during this rebinding, it gives me the
above out of memory error.

I already have the server memory set to -Xmx1024M... so that
shouldn't
be an issue.. is there a problem (ie memory leak) with DevMode? Or am
I missing some parameter somewhere?


Ikai L (Google)
----------
Tristan,
Is this a Google Web Toolkit question or a Google App Engine
(OutOfMemoryError on Jetty) question? It sounds like a GWT question,
in which case you should ask here:
http://groups.google.com/group/Google-Web-Toolkit


Tristan
------------
I think it's a Google App Engine (OutOfMemoryError on Jetty)
question.
After Selenium RC hits the Dev Mode url about 34 times, I get
previously mentioned error [ERROR] Out of memory; to increase the
amount of memory, use the -Xmx flag at startup (java -Xmx128M ...)
This happens with -Xmx1024M setting.
So is there a way to free up memory after connection is broken? When
Selenium breaks the connection, DevMode quits with the following
exception:
20:02:12.232 [ERROR] [myModule] Remote connection lost
com.google.gwt.dev.shell.BrowserChannel$RemoteDeathError: Remote
connection lost
at
com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java :
1683)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan
nelServer.java:
401)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java :
222)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.io.EOFException: null
at java.io.DataInputStream.readByte(DataInputStream.java:250)
at com.google.gwt.dev.shell.BrowserChannel
$Message.readMessageType(BrowserChannel.java:1131)
at
com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java :
1659)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan
nelServer.java:
401)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java :
222)
at java.lang.Thread.run(Thread.java:637)
So does this cause a memory leak? Then after 34 of these, it finally
runs out of memory.

Tristan
-----------
Sorry, forgot to thank you for responding quickly :) Thanks Ikai.

Ikai L (Google)
------------
I don't recognize that stack trace - I see com.google.gwt.dev.shell.
GWT has a DevMode server, from what I remember. If it possible for
you
to compile the code to JavaScript, then run your Selenium tests? It
really does look like a GWT issue, but the references to
BrowserChannel somewhat unnerve me.

Tristan
-------------
Thanks for taking a crack at it Ikai, I compiled the code but still
ran out of memory around 34 Selenium touches. I'll post it in the GWT
forum as you suggested.
Cheers!

Tristan

unread,
Mar 19, 2010, 10:16:53 AM3/19/10
to Google Web Toolkit
So nobody has a clue as to why DevMode would run out of memory after
34 URL refreshes?

Nathan Wells

unread,
Mar 19, 2010, 1:13:36 PM3/19/10
to Google Web Toolkit
I get similar problems, but they are related to restarting the server,
rather than refreshing the browser, and only while developing, not in
a Selenium server.

You might be able to resolve your issue by way of the -noserver
option. I haven't yet looked for documentation about it, but it allows
you to run any given server rather than the embedded Jetty server.

Tristan

unread,
Mar 20, 2010, 1:43:13 PM3/20/10
to Google Web Toolkit
No resolution on out of memory issue.

I ended up hosting a development version on app engine and running my
selenium tests against that.

Reply all
Reply to author
Forward
0 new messages