You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2007/03/16 07:28:27 UTC
DO NOT REPLY [Bug 41855] New: - Connection leaks problem when browser gets closed while loading a time consuming html page
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41855>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41855
Summary: Connection leaks problem when browser gets closed while
loading a time consuming html page
Product: Tomcat 5
Version: 5.0.28
Platform: Other
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: Connector:HTTP
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: prabhu@efrontier.com
This is what the problem is. I have some servlets that will take more than 10
mins to execute for the very first request. (I know this is wrong, but please
go ahead).
What happens is when a number of users logs in and tries to access this page,
it will take 10 mins for each such request. The users get frustrated and close
their browser or presses stop button.
But our tomcat still continues to execute the servlet and finishes executing
only after 10 mins. This can be confirmed by looking at the log messages.
The direct effect is that when lots of such connections gets accumulated,
tomcat eventually dies with out of memory.
Let me know if this issue could be fixed or is already fixed.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 41855] - Connection leaks problem when browser gets closed while loading a time consuming html page
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41855>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41855
------- Additional Comments From prabhu@efrontier.com 2007-03-15 23:29 -------
Ideally, tomcat should stop execution when the HTTP connection is not alive.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 41855] - Connection leaks problem when browser gets closed while loading a time consuming html page
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41855>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41855
------- Additional Comments From fhanik@apache.org 2007-03-16 09:57 -------
ok, I ran off to the king and asked him for some time, he devoted two whole
seconds and said:
"oh, for heavens sake, just use google."
This has nothing to do with NIO, just spawn of a thread to do the job, then send
a response with a refresh header, the browser will open a new connection/request
to check if the result is complete, if it isn't send another refresh header, if
it is, send the results. you don't need to execute the 10min task on the servlet
worker thread.
look for long running
http://simple.souther.us/not-so-simple.html
Also, the another dude on the throne decided to throw in another tip
"Turn off keep alives otherwise you are still hogging the worker thread during
your refresh period"
now for more support, this is not the place, The Tomcat User List is filled with
brilliant and nice people willing help.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 41855] - Connection leaks problem when browser gets closed while loading a time consuming html page
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41855>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41855
------- Additional Comments From quartz12h@yahoo.com 2007-03-16 09:11 -------
(please excuse the previous inappropriate insult; the privileged majesties of
the kingdom are, unlike the rest of us, under a lot of stress and pressure, and
lack time to compose and post better insults).
All that to say, your servlet must do 2 things: perform the main work and
monitor the connection. This is not the responsibility of the container.
Actually the container cannot figure out (not without NIO* at least) that the
servlet/socket output was abandoned/closed without attempting to write to it,
which would corrupt the response stream content.
If your response content can support comment-like data, for example for html
comment, or some #ping text, or whatever appropriate to the ongoing protocol,
than your servlet could write periodically such comment to check the client
connection viability. But such background test, while the main task is still
running, requires another thread unless you main task is asynchronous. Depending
in the security manager in place, you might not have the right to spawn threads
in the servlet container.
*NIO: the servletoutputstream isn't a selectable channel, tomcat container would
have to perform such monitoring and expose the socket output state in the
servlet api, which isn't about to happen soon...
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 41855] - Connection leaks problem when browser gets closed while loading a time consuming html page
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41855>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41855
fhanik@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
------- Additional Comments From fhanik@apache.org 2007-03-16 07:28 -------
This is a problem with your application, if requests take 10 minutes to complete
redesign your app to dispatch into your own thread pool. There are thousands of
applications that already have solved this problem. Put your thinking cap on,
and maybe you will too.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org