hello,I have some question

56 views
Skip to first unread message

Dan Huang

unread,
Jun 5, 2012, 1:47:04 AM6/5/12
to RingoJS
Hi,
I am an beginner in ringo,I have question

action.js

var signal=""; //signal is a global obj
app.get("/getsignal",function(req){
return response.json({'result':signal});
});

and i use yui in base.html , and set setInteval to polling
the signal

there's some thing happened,I get Exception in dos cmd
like Wrapped org.eclipse.jetty.io.EofException
and I open taskmgr(win 7 home_premium),I saw
java.exe memory usage grow up by time and my system
later get Out of resource, I thought it's a gc problem,
so I change ringo.cmd
@java -Xms80M -Xmx90M -jar "%~dp0\..\run.jar" %*
but after it occur the EofException,memory still growup


How can I prvent this problem or Detect the memory
leak


//// there is the exception
Wrapped org.eclipse.jetty.io.EofException (ringo/jsgi/
connector.js#125)
at ringo/jsgi/connector.js:125 (anonymous)
at ringo/jsgi/connector.js:127 (writeBody)
at ringo/jsgi/connector.js:101 (writeResponse)
at ringo/jsgi/connector.js:93 (commitResponse)
at ringo/jsgi/connector.js:45 (handleRequest)

2674089 [qtp2030210340-77] WARN org.eclipse.jetty.util.log - /
getsignal
org.mozilla.javascript.WrappedException: Wrapped
org.eclipse.jetty.io.EofExcepti
on (ringo/jsgi/connector.js#125)
at
org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:17
86)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:183)
at
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:24
7)
at
org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)

at
org.mozilla.javascript.gen.ringo_jsgi_connector_js_46._c_anonymous_9(
ringo/jsgi/connector.js:125)
at
org.mozilla.javascript.gen.ringo_jsgi_connector_js_46.call(ringo/jsgi
/connector.js)
at
org.mozilla.javascript.NativeArray.iterativeMethod(NativeArray.java:1
563)
at
org.mozilla.javascript.NativeArray.execIdCall(NativeArray.java:345)
at
org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:12
9)
at
org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)

at
org.mozilla.javascript.gen.ringo_jsgi_connector_js_46._c_writeBody_8(
ringo/jsgi/connector.js:127)
at
org.mozilla.javascript.gen.ringo_jsgi_connector_js_46.call(ringo/jsgi
/connector.js)
at
org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:
97)
at
org.mozilla.javascript.gen.ringo_jsgi_connector_js_46._c_writeRespons
e_5(ringo/jsgi/connector.js:101)
at
org.mozilla.javascript.gen.ringo_jsgi_connector_js_46.call(ringo/jsgi
/connector.js)
at
org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:
97)
at
org.mozilla.javascript.gen.ringo_jsgi_connector_js_46._c_commitRespon
se_4(ringo/jsgi/connector.js:93)
at
org.mozilla.javascript.gen.ringo_jsgi_connector_js_46.call(ringo/jsgi
/connector.js)
at
org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:
97)
at
org.mozilla.javascript.gen.ringo_jsgi_connector_js_46._c_handleReques
t_1(ringo/jsgi/connector.js:45)
at
org.mozilla.javascript.gen.ringo_jsgi_connector_js_46.call(ringo/jsgi
/connector.js)
at
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:4
26)
at
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:317
8)
at
org.mozilla.javascript.gen.ringo_jsgi_connector_js_46.call(ringo/jsgi
/connector.js)
at org.ringojs.engine.RhinoEngine.invoke(RhinoEngine.java:253)
at org.ringojs.jsgi.JsgiServlet.service(JsgiServlet.java:147)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
820)
at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538
)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java
:478)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j
ava:119)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:517)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandl
er.java:225)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandl
er.java:937)
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:
406)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandle
r.java:183)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandle
r.java:871)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j
ava:117)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(Cont
extHandlerCollection.java:247)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerColl
ection.java:149)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper
.java:110)
at org.eclipse.jetty.server.Server.handle(Server.java:346)
at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.
java:589)
at org.eclipse.jetty.server.HttpConnection
$RequestHandler.headerComplete
(HttpConnection.java:1048)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:
601)
at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)

at
org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:41
1)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEn
dPoint.java:531)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint
$1.run(SelectChannelEnd
Point.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool
$3.run(QueuedThreadPool
.java:529)
at java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.jetty.io.EofException
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:
149)
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:
106)
at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown
Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
... 48 more
Wrapped org.eclipse.jetty.io.EofException (ringo/jsgi/
connector.js#125)
at ringo/jsgi/connector.js:125 (anonymous)
at ringo/jsgi/connector.js:127 (writeBody)
at ringo/jsgi/connector.js:101 (writeResponse)
at ringo/jsgi/connector.js:93 (commitResponse)
at ringo/jsgi/connector.js:45 (handleRequest)



Darren Cruse

unread,
Jun 11, 2012, 9:00:27 AM6/11/12
to rin...@googlegroups.com
Hi Dan,

Did you make any progress on this problem?  I notice nobody replied to you.  To be honest the forum has been exceptionally quiet for several months now and I don't know if there's a reason...

FWIW I've been working with Ringo for about a year or so and I hadn't noticed memory leaks like this, but we're actually not in production yet and I'd love to know if what you're seeing is real - i.e. before I get in production! :)

Did you say what version of ringo you're using btw?  I assume either 0.8 or trunk?

Also at what frequency are you "polling your signal"?  (just curious)

My week looks pretty busy but if there's a way you could zip your files up and e-mail them I'd offer to at least look them over maybe this weekend if not before.

If nothing else I could confirm that the problem reproduces on my machine.

Dan Huang

unread,
Jun 12, 2012, 9:21:44 PM6/12/12
to rin...@googlegroups.com
Hi, Darren
                Thanks for your response,I learn the ringo and wrote it bcz now it's required for working.
                I use Ringo version is 0.8,about 1 second in cycle,I use setInterval(function(){},1000),
                I noticed the problem when I test, but now my computer(win 7 home premium x64,4G memory)
                I use jdk 1.7,and I change the ringo.cmd in /bin the original @java -jar "%~dp0\..\run.jar" %*
                                                                                     the modified @java -Xms80M -Xmx90M -jar "%~dp0\..\run.jar" %*
                ,still occur the exception,but the java.exe will grow up to 120m,and will release(start GC),so now it didn't eat all source
                I continue to pay close attention in this issue
  
                ps. I will ask my leader,could I package a part of code to you
                

2012/6/11 Darren Cruse <darren...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "RingoJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ringojs/-/7SqyU5tUY9YJ.
To post to this group, send email to rin...@googlegroups.com.
To unsubscribe from this group, send email to ringojs+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ringojs?hl=en.

Reply all
Reply to author
Forward
0 new messages