Hi

I see that event.setTimeout working at main trunk with NIO., Thanks :-) I miss many Cluster and Comet fixes at changelog!

Setting with Connector keepAliveTimeout only working at APR! Why APR don't support event.setTimeout?

Peter


Am 21.05.2007 um 21:46 schrieb Peter Rossbach:

Hi,

I have play arround with Tomcat Comet timeout ( 6.0.13 MAC OSX) with Firefox 2.0.0.3.

---------------------------------------------------------------------- ------------------------------------------------------
APR
a)      Set connectionTimeout= 300000 and keepAliveTimeout=40000
Result after 40 sec CometProcessor get an event-ERROR with subtype TIMEOUT
b)    event isn't closed but connection is open
Result after 40 sec CometProcessor get an event-ERROR with subtype TIMEOUT
c)    event isn't closed but connection is open
...

xx) After browser close END Event is send.

===
INFO: ChatServlet: Receive COMET.BEGIN for session: F637A080A79008C6072187E92D34DB56.tomcat6 clientID: 718f8bef- a183-4359-93ef-4a7ad1f813a8-cometClient Subtype: null
21.05.2007 20:58:47 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: begin comet connection
21.05.2007 20:58:49 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: add comet message xcvxcv
21.05.2007 20:58:49 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: send pendingMessages to comet events (number of listener=1)
21.05.2007 20:58:49 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: send to 718f8bef-a183-4359-93ef-4a7ad1f813a8- cometClient
21.05.2007 20:58:53 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: add comet message xcvxcvxvx
21.05.2007 20:58:53 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: send pendingMessages to comet events (number of listener=1)
21.05.2007 20:58:53 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: send to 718f8bef-a183-4359-93ef-4a7ad1f813a8- cometClient
21.05.2007 20:59:27 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: Receive TIMEOUT for session: F637A080A79008C6072187E92D34DB56.tomcat6 clientID: 718f8bef- a183-4359-93ef-4a7ad1f813a8-cometClient Subtype: TIMEOUT
21.05.2007 21:00:07 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: Receive TIMEOUT for session: F637A080A79008C6072187E92D34DB56.tomcat6 clientID: 718f8bef- a183-4359-93ef-4a7ad1f813a8-cometClient Subtype: TIMEOUT
21.05.2007 21:00:47 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: Receive TIMEOUT for session: F637A080A79008C6072187E92D34DB56.tomcat6 clientID: 718f8bef- a183-4359-93ef-4a7ad1f813a8-cometClient Subtype: TIMEOUT
21.05.2007 21:01:27 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: Receive TIMEOUT for session: F637A080A79008C6072187E92D34DB56.tomcat6 clientID: 718f8bef- a183-4359-93ef-4a7ad1f813a8-cometClient Subtype: TIMEOUT
21.05.2007 21:02:07 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: Receive TIMEOUT for session: F637A080A79008C6072187E92D34DB56.tomcat6 clientID: 718f8bef- a183-4359-93ef-4a7ad1f813a8-cometClient Subtype: TIMEOUT
21.05.2007 21:02:47 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: Receive TIMEOUT for session: F637A080A79008C6072187E92D34DB56.tomcat6 clientID: 718f8bef- a183-4359-93ef-4a7ad1f813a8-cometClient Subtype: TIMEOUT
21.05.2007 21:03:28 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: Receive TIMEOUT for session: F637A080A79008C6072187E92D34DB56.tomcat6 clientID: 718f8bef- a183-4359-93ef-4a7ad1f813a8-cometClient Subtype: TIMEOUT
21.05.2007 21:04:08 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: Receive TIMEOUT for session: F637A080A79008C6072187E92D34DB56.tomcat6 clientID: 718f8bef- a183-4359-93ef-4a7ad1f813a8-cometClient Subtype: TIMEOUT
21.05.2007 21:04:22 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: Receive COMET.END for session: F637A080A79008C6072187E92D34DB56.tomcat6 clientID: 718f8bef- a183-4359-93ef-4a7ad1f813a8-cometClient Subtype: null
====

---------------------------------------------------------------------- ------------------------------------------------------
NIO
a)      Set connectionTimeout= 300000 and keepAliveTimeout=40000
Result after 300 sec CometProcessor get an event-ERROR with subtype TIMEOUT
b)    event isn't  closed but connection is closed
 ====
21.05.2007 21:08:55 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: Receive COMET.BEGIN for session: A17717134BA78FD44BF595816FB2B67B.tomcat6 clientID: 0e93be13-30a8-4f8f-a7f8-762cb2a242d8-cometClient Subtype: null
21.05.2007 21:08:55 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: begin comet connection
21.05.2007 21:08:55 org.apache.coyote.http11.Http11NioProtocol $Http11ConnectionHandler process FEIN: Not recycling [EMAIL PROTECTED] Comet=true 21.05.2007 21:08:57 org.apache.coyote.http11.Http11NioProtocol $Http11ConnectionHandler register FEIN: Register [EMAIL PROTECTED] count=2
21.05.2007 21:08:57 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: add comet message xyc
21.05.2007 21:08:57 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: send pendingMessages to comet events (number of listener=1)
21.05.2007 21:08:57 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: send to 0e93be13-30a8-4f8f-a7f8-762cb2a242d8- cometClient
21.05.2007 21:08:59 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: add comet message xycyxcyxcy
21.05.2007 21:08:59 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: send pendingMessages to comet events (number of listener=1)
21.05.2007 21:08:59 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: send to 0e93be13-30a8-4f8f-a7f8-762cb2a242d8- cometClient 21.05.2007 21:13:59 org.apache.coyote.http11.Http11NioProtocol $Http11ConnectionHandler event
FEIN: Http11NioProcessor.error=false
21.05.2007 21:13:59 org.apache.catalina.core.ApplicationContext log
INFO: ChatServlet: Receive TIMEOUT for session: A17717134BA78FD44BF595816FB2B67B.tomcat6 clientID: 0e93be13-30a8-4f8f-a7f8-762cb2a242d8-cometClient Subtype: TIMEOUT 21.05.2007 21:13:59 org.apache.coyote.http11.Http11NioProtocol $Http11ConnectionHandler event FEIN: Keeping processor [EMAIL PROTECTED]

--
tomcat/examples/cometpr peter$ netstat -an | grep 30014
tcp4 0 0 127.0.0.1.30014 127.0.0.1.51184 ESTABLISHED tcp4 0 0 127.0.0.1.51184 127.0.0.1.30014 ESTABLISHED tcp4 0 0 *.30014 *.* LISTEN
tomcat/examples/cometpr peter$ netstat -an | grep 30014
tcp4 0 0 *.30014 *.* LISTEN

=====

My question are:
- Why timeouts differ?
- Why event.setTimeout at APR not supported?
==
INFO: ChatServlet: Receive COMET.BEGIN for session: DDE19B1329847C61E17670AB52D9E27C.tomcat6 clientID: 363aa59e-871c-4708-befb-337715b5c551-cometClient Subtype: null
21.05.2007 21:42:34 org.apache.catalina.core.ApplicationContext log
SCHWERWIEGEND: ChatServlet: can't set timeout
java.lang.UnsupportedOperationException
at org.apache.catalina.connector.CometEventImpl.setTimeout (CometEventImpl.java:120) at org.objektpark.catalina.cometchat.ChatServlet.begin (ChatServlet.java:138) at org.objektpark.catalina.cometchat.ChatServlet.event (ChatServlet.java:117) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilterEvent( ApplicationFilterChain.java:470) at org.apache.catalina.core.ApplicationFilterChain.doFilterEvent (ApplicationFilterChain.java:363) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:227) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:175) at org.apache.catalina.valves.CometConnectionManagerValve.invoke (CometConnectionManagerValve.java:256) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:104) at org.apache.catalina.valves.AccessLogValve.invoke (AccessLogValve.java:563) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11AprProcessor.process (Http11AprProcessor.java:852) at org.apache.coyote.http11.Http11AprProtocol $Http11ConnectionHandler.process(Http11AprProtocol.java:584) at org.apache.tomcat.util.net.AprEndpoint$Worker.run (AprEndpoint.java:1508)
        at java.lang.Thread.run(Thread.java:637)
===

- Why connection at NIO is closed after timeout ?  See documentation
Why NIO Processor is not removed form connections list at HTTP11NioProtocol.$Http11ConnectionHandler?

== AIO.html ==

EventType.ERROR: Error will be called by the container in the case where an IO exception or a similar unrecoverable error occurs on the connection. Fields that have been initialized in the begin method should be reset. After this event has been processed, the request and response objects, as well as all their dependent objects will be recycled and used to process other requests. There are some event subtypes which allow finer processing of events (note: some of these events require usage of the org.apache.catalina.valves.CometConnectionManagerValve valve):

EventSubType.TIMEOUT: The connection timed out (sub type of ERROR); note that this ERROR type is not fatal, and the connection will not be closed unless the servlet uses the close method of the event.
===

- Why as client quit no ERROR event is send?

Regards
Peter




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to