> As far as I under stand I should NOT close the "stream" object as I didn't
> open it.

That's my understanding too.  When I said I was keeping connections
open, I meant I was opening connections from the client and not
closing them.  Since I'm using comet servlets, the server keeps the
connections open until the client disconnects.  When I open many
connections, I see classes in my heap similar to those you show.

If you keep a reference to the Request object tucked away somewhere on
the server inadvertently, the associated buffers won't go away and
memory will continue to grow.  Is it possible that you're keeping a
reference to the Request or any of the "streams" somewhere?  Is it
possible that some of your servlets aren't returning and thus never
closing their connections?

What classes are holding references to these classes?

- org.apache.catalina.connector.ResponseFacade (ACCA)
- <class>[] (ACCB)
- org.apache.catalina.connector.Request (ACCC)

Peter

On 9/7/07, Morten <[EMAIL PROTECTED]> wrote:
>
> "Peter Warren" <[EMAIL PROTECTED]> skrev i en meddelelse
> news:[EMAIL PROTECTED]
> > Is it possible you're caching Request or Response objects somewhere
> > and not releasing them?  I just did a bunch of memory profiling and
> > many of the classes you mention are the same classes I see when I open
> > and don't close a bunch of connections to the server.
> >
> My code in the bottom of the servlet is such:
>
> ServletOutputStream stream = _response.getOutputStream();
> BufferedOutputStream bos = new BufferedOutputStream(stream);
> bos.write(bytes);
> stream.flush();
> bos.close();
>
> As far as I under stand I should NOT close the "stream" object as I didn't
> open it.
>
> Best regards,
>
> Morten
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to