You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sebastiaan van Erk <se...@sebster.com> on 2007/06/26 15:17:27 UTC

read data/infinite loop problem with comet

Hi,

I'm having a problem reading data in my Comet servlet.

In the BEGIN event I have the following loop:

    while (request.getInputStream().available() > 0) {
       // log that in read loop, log available()
       // read some data
    }
    // log that read loop is done, log available()
    return;

However, even though I keep reading until available() returns 0, I get a 
SEVERE error complaining I did not read all the available data, which 
can be seen from the following logs:

2007-06-26 14:37:08,427 DEBUG [http-8080-exec-4] 
com.sebster.myservlet.TomcatCometServlet - BEGIN event for request 
org.apache.catalina.connector.RequestFacade@d47c99
2007-06-26 14:37:08,427 DEBUG [http-8080-exec-4] 
com.sebster.myservlet.TomcatCometServlet - 127.0.0.1:60578 POST 
/mycometservlet
2007-06-26 14:37:08,432 DEBUG [http-8080-exec-4] 
com.sebster.myservlet.TomcatCometServlet - 
[24224039-a37e-40d0-a076-89d1df363390] read loop in BEGIN event, input 
stream data available: 1
2007-06-26 14:37:08,438 DEBUG [http-8080-exec-4] 
com.sebster.myservlet.TomcatCometServlet - 
[24224039-a37e-40d0-a076-89d1df363390] read loop done, input stream data 
available: 0
2007-06-26 2:37:08.MD org.apache.catalina.connector.CoyoteAdapter event
SEVERE: The servlet did not read all available bytes during the 
processing of the read event

After this, the poller goes into an infinite event handling busy loop.

I looked at what the poller was doing, and it seems to be setting the 
comet event into the END event type and trying to call the event method, 
however, it never arrives at my Comet processor's event method (it seems 
to call an event method on an error valve or though). I don't know what 
exactly happens, but I can debug more if necessary.

Does anybody know what the proper way to read ALL the data is, and not 
cause this exception to happen?

Regards,
Sebastiaan


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


Re: read data/infinite loop problem with comet

Posted by Sebastiaan van Erk <se...@sebster.com>.
Hi,

Nobody's ever an idiot for trying to help, and I appreciate the effort 
even if you misunderstood the question in my email. Perhaps (very 
likely, probably), I was not very clear either; I already have the 
context of my question in my mind and as such often forget to make the 
context adequately clear for others.

Regards,
Sebastiaan

Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Sebastiaan,
>
> Sebastiaan van Erk wrote:
>   
>> Thanks for the reply. :-)
>>     
>
> Okay, this is what I get for responding to a question about Comet,
> something about which I have no familiarity whatsoever.
>
> I didn't realize that this was an event handler that basically meant
> "there's data ready" and that you did /not/ want to block waiting for data.
>
> Basically, I have given you great advice for something you aren't doing ;)
>
> I hope someone else responds by saying "hey, this guy is an idiot" and
> you get a useful answer.
>
> Sorry for the useless response :(
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGgWhg9CaO5/Lv0PARAsxsAJ9T30AWbEUCJnqO6obXTGR3uDp7IQCfT/1R
> zEnB1kdKBrqFdYBLS1YWIgc=
> =D45G
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>   

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


Re: read data/infinite loop problem with comet

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sebastiaan,

Sebastiaan van Erk wrote:
> Thanks for the reply. :-)

Okay, this is what I get for responding to a question about Comet,
something about which I have no familiarity whatsoever.

I didn't realize that this was an event handler that basically meant
"there's data ready" and that you did /not/ want to block waiting for data.

Basically, I have given you great advice for something you aren't doing ;)

I hope someone else responds by saying "hey, this guy is an idiot" and
you get a useful answer.

Sorry for the useless response :(

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGgWhg9CaO5/Lv0PARAsxsAJ9T30AWbEUCJnqO6obXTGR3uDp7IQCfT/1R
zEnB1kdKBrqFdYBLS1YWIgc=
=D45G
-----END PGP SIGNATURE-----

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


Re: read data/infinite loop problem with comet

Posted by Sebastiaan van Erk <se...@sebster.com>.
Hi Christopher,

Thanks for the reply. :-)

Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Sebastiaan,
>
> Sebastiaan van Erk wrote:
>   
>> I'm having a problem reading data in my Comet servlet.
>>
>> In the BEGIN event I have the following loop:
>>
>>    while (request.getInputStream().available() > 0) {
>>       // log that in read loop, log available()
>>       // read some data
>>    }
>>    // log that read loop is done, log available()
>>    return;
>>     
>
> Are you sure this is what you want to do? This loop is not guaranteed to
> read all of the incoming data.
>
>   
Yes this is what I do, because of what the what the Comet docs say 
(http://tomcat.apache.org/tomcat-6.0-doc/aio.html):

EventType.READ: This indicates that input data is available, and that 
one read can be made without blocking. The available and ready methods 
of the InputStream or Reader may be used to determine if there is a risk 
of blocking: the servlet should read while data is reported available, 
and can make one additional read should read while data is reported 
available.

I realize that I'm in the BEGIN event, but that's because data that 
arrives in the request header buffer of Tomcat internally does not cause 
a new READ event, so I have to start reading in the BEGIN event.
> Check the javadoc for InputStream.available:
> http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html#available():
>
> "Returns the number of bytes that can be read (or skipped over) from
> this input stream without blocking by the next caller of a method for
> this input stream."
>
> If there will be 100 bytes eventually, but only 50 are available now,
> you'll get 50 as the return value. If you read those bytes, but the rest
> are unavailable, then your second loop condition evaluation will return
> 0, and the loop will exit (with 50 bytes still on the way).
>
>   
I don't see why the loop is wrong (maybe I'm sleeping). But I keep 
reading while there are bytes available. If the bytes are not available, 
then I return from the event() method, and expect a READ event when 
there are newly available bytes. Instead Tomcat complains 
(immediately!!) that I've not read all available data, even though 
available() returned 0!

>> Does anybody know what the proper way to read ALL the data is, and not
>> cause this exception to happen?
>>     
>
> If you want to read /all/ data and not worry about blocking, you should
> be doing this:
>
> byte[] buffer = new byte[BUFFER_SIZE];
> int read;
>
> while(0 < (read = request.getInputStream().read(buffer))
> {
>     // do something with 'read' bytes of data from the buffer
> }
>
>   
I don't understand why this is different from what I do. As soon as no 
bytes are available the loop exits.

Regards,
Sebastiaan


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


Re: read data/infinite loop problem with comet

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sebastiaan,

Sebastiaan van Erk wrote:
> I'm having a problem reading data in my Comet servlet.
> 
> In the BEGIN event I have the following loop:
> 
>    while (request.getInputStream().available() > 0) {
>       // log that in read loop, log available()
>       // read some data
>    }
>    // log that read loop is done, log available()
>    return;

Are you sure this is what you want to do? This loop is not guaranteed to
read all of the incoming data.

Check the javadoc for InputStream.available:
http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html#available():

"Returns the number of bytes that can be read (or skipped over) from
this input stream without blocking by the next caller of a method for
this input stream."

If there will be 100 bytes eventually, but only 50 are available now,
you'll get 50 as the return value. If you read those bytes, but the rest
are unavailable, then your second loop condition evaluation will return
0, and the loop will exit (with 50 bytes still on the way).

> Does anybody know what the proper way to read ALL the data is, and not
> cause this exception to happen?

If you want to read /all/ data and not worry about blocking, you should
be doing this:

byte[] buffer = new byte[BUFFER_SIZE];
int read;

while(0 < (read = request.getInputStream().read(buffer))
{
    // do something with 'read' bytes of data from the buffer
}

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGgSMJ9CaO5/Lv0PARAss5AKC6FGl6VWseNj2cqJA4hE/R2HZSZQCfW/x1
1AzxGVpySeNpLNZalukYZx8=
=jxPX
-----END PGP SIGNATURE-----

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


Re: read data/infinite loop problem with comet

Posted by Sebastiaan van Erk <se...@sebster.com>.
Hi,

Thanks for the suggestion. I already tried that fix, unfortunately it 
does not work. The problem is that even without those two lines, the 
event() method is not called again with a new READ event for the newly 
available data.

That said, the check seems wrong to me as well. If the servlet does not 
read all the data then I'm all for another call to the event() method.

Regards,
Sebastiaan

Reich, Matthias wrote:
> Hi,
>
> my feeling is that the CoyoteAdapter does a check that should not be
> done in this place (just because the implicit assumption is wrong that
> nothing will happen concurrently during the few nano seconds between the
> Servlet's available() check and the check of the adapter.)
>
> It looks as if the CoyoteAdapter code does not want to rely on the
> Servlet programmer to do the available() checks correctly and therefore
> tries to avoid loops of read events which could result from incorrect
> Servlet code.
>
> You could try to simply remove the lines 
>
>   
>>                 } else if (!error && read && request.getAvailable()) {
>>                     // If this was a read and not all bytes have been 
>> read, or if no data
>>                     // was read from the connector, then it 
>> is an error
>>                     error = true;
>>                     log.error(sm.getString("coyoteAdapter.read"));
>>                 }
>>     
>
> from the CoyoteAdapter code and run your Comet Servlet with the modified
> CoyoteAdapter.
>
> If it works, suggest this modification as a bug fix.
>
>
> Regards,
> Matthias
>
>   
>> -----Original Message-----
>> From: Sebastiaan van Erk [mailto:sebster@sebster.com] 
>> Sent: Tuesday, June 26, 2007 6:53 PM
>> To: Tomcat Users List
>> Subject: Re: read data/infinite loop problem with comet
>>
>> Hi all,
>>
>> I looked in the Tomcat source code (6.0.13), and I really do not 
>> understand how I'm supposed to avoid the following error:
>>
>> SEVERE: The servlet did not read all available bytes during the 
>> processing of the read event
>>
>> What seems to be happening is this:
>>
>> In my event method():
>>    while (request.getInputStream().available() > 0) {
>>       // read some data
>>    }
>>    // ***** NO MORE DATA AVAILABLE
>>    return;
>>
>> A bit later in CoyoteAdapter (187):
>>
>>                 // *** SOME DATA ARRIVES SOMEWHERE HERE
>>                 } else if (!error && read && request.getAvailable()) {
>>                     // If this was a read and not all bytes have been 
>> read, or if no data
>>                     // was read from the connector, then it 
>> is an error
>>                     error = true;
>>                     log.error(sm.getString("coyoteAdapter.read"));
>>                 }
>>                 return (!error);
>>
>> I checked the source code, and CoyoteInputStream.available() and 
>> Request.getAvailable() both return exactly the same value, namely 
>> InputBuffer.available(). So it seems that between my return and this 
>> check new data arrived has arrived, causing failure. What's worse, my 
>> CometProcessor does not get notified (I don't know why) of the error, 
>> and the Poller goes in an infinite loop.
>>
>> Does anybody know how I can solve this problem?
>>
>> Regards,
>> Sebastiaan
>>
>> Sebastiaan van Erk wrote:
>>     
>>> Hi,
>>>
>>> I'm having a problem reading data in my Comet servlet.
>>>
>>> In the BEGIN event I have the following loop:
>>>
>>>    while (request.getInputStream().available() > 0) {
>>>       // log that in read loop, log available()
>>>       // read some data
>>>    }
>>>    // log that read loop is done, log available()
>>>    return;
>>>
>>> However, even though I keep reading until available() 
>>>       
>> returns 0, I get 
>>     
>>> a SEVERE error complaining I did not read all the available data, 
>>> which can be seen from the following logs:
>>>
>>> 2007-06-26 14:37:08,427 DEBUG [http-8080-exec-4] 
>>> com.sebster.myservlet.TomcatCometServlet - BEGIN event for request 
>>> org.apache.catalina.connector.RequestFacade@d47c99
>>> 2007-06-26 14:37:08,427 DEBUG [http-8080-exec-4] 
>>> com.sebster.myservlet.TomcatCometServlet - 127.0.0.1:60578 POST 
>>> /mycometservlet
>>> 2007-06-26 14:37:08,432 DEBUG [http-8080-exec-4] 
>>> com.sebster.myservlet.TomcatCometServlet - 
>>> [24224039-a37e-40d0-a076-89d1df363390] read loop in BEGIN 
>>>       
>> event, input 
>>     
>>> stream data available: 1
>>> 2007-06-26 14:37:08,438 DEBUG [http-8080-exec-4] 
>>> com.sebster.myservlet.TomcatCometServlet - 
>>> [24224039-a37e-40d0-a076-89d1df363390] read loop done, input stream 
>>> data available: 0
>>> 2007-06-26 2:37:08.MD 
>>>       
>> org.apache.catalina.connector.CoyoteAdapter event
>>     
>>> SEVERE: The servlet did not read all available bytes during the 
>>> processing of the read event
>>>
>>> After this, the poller goes into an infinite event handling 
>>>       
>> busy loop.
>>     
>>> I looked at what the poller was doing, and it seems to be 
>>>       
>> setting the 
>>     
>>> comet event into the END event type and trying to call the event 
>>> method, however, it never arrives at my Comet processor's 
>>>       
>> event method 
>>     
>>> (it seems to call an event method on an error valve or though). I 
>>> don't know what exactly happens, but I can debug more if necessary.
>>>
>>> Does anybody know what the proper way to read ALL the data 
>>>       
>> is, and not 
>>     
>>> cause this exception to happen?
>>>
>>> Regards,
>>> Sebastiaan
>>>
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>>     
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>       
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>   

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


RE: read data/infinite loop problem with comet

Posted by "Reich, Matthias" <ma...@siemens.com>.
Hi,

my feeling is that the CoyoteAdapter does a check that should not be
done in this place (just because the implicit assumption is wrong that
nothing will happen concurrently during the few nano seconds between the
Servlet's available() check and the check of the adapter.)

It looks as if the CoyoteAdapter code does not want to rely on the
Servlet programmer to do the available() checks correctly and therefore
tries to avoid loops of read events which could result from incorrect
Servlet code.

You could try to simply remove the lines 

>                 } else if (!error && read && request.getAvailable()) {
>                     // If this was a read and not all bytes have been 
> read, or if no data
>                     // was read from the connector, then it 
> is an error
>                     error = true;
>                     log.error(sm.getString("coyoteAdapter.read"));
>                 }

from the CoyoteAdapter code and run your Comet Servlet with the modified
CoyoteAdapter.

If it works, suggest this modification as a bug fix.


Regards,
Matthias

> -----Original Message-----
> From: Sebastiaan van Erk [mailto:sebster@sebster.com] 
> Sent: Tuesday, June 26, 2007 6:53 PM
> To: Tomcat Users List
> Subject: Re: read data/infinite loop problem with comet
> 
> Hi all,
> 
> I looked in the Tomcat source code (6.0.13), and I really do not 
> understand how I'm supposed to avoid the following error:
> 
> SEVERE: The servlet did not read all available bytes during the 
> processing of the read event
> 
> What seems to be happening is this:
> 
> In my event method():
>    while (request.getInputStream().available() > 0) {
>       // read some data
>    }
>    // ***** NO MORE DATA AVAILABLE
>    return;
> 
> A bit later in CoyoteAdapter (187):
> 
>                 // *** SOME DATA ARRIVES SOMEWHERE HERE
>                 } else if (!error && read && request.getAvailable()) {
>                     // If this was a read and not all bytes have been 
> read, or if no data
>                     // was read from the connector, then it 
> is an error
>                     error = true;
>                     log.error(sm.getString("coyoteAdapter.read"));
>                 }
>                 return (!error);
> 
> I checked the source code, and CoyoteInputStream.available() and 
> Request.getAvailable() both return exactly the same value, namely 
> InputBuffer.available(). So it seems that between my return and this 
> check new data arrived has arrived, causing failure. What's worse, my 
> CometProcessor does not get notified (I don't know why) of the error, 
> and the Poller goes in an infinite loop.
> 
> Does anybody know how I can solve this problem?
> 
> Regards,
> Sebastiaan
> 
> Sebastiaan van Erk wrote:
> > Hi,
> >
> > I'm having a problem reading data in my Comet servlet.
> >
> > In the BEGIN event I have the following loop:
> >
> >    while (request.getInputStream().available() > 0) {
> >       // log that in read loop, log available()
> >       // read some data
> >    }
> >    // log that read loop is done, log available()
> >    return;
> >
> > However, even though I keep reading until available() 
> returns 0, I get 
> > a SEVERE error complaining I did not read all the available data, 
> > which can be seen from the following logs:
> >
> > 2007-06-26 14:37:08,427 DEBUG [http-8080-exec-4] 
> > com.sebster.myservlet.TomcatCometServlet - BEGIN event for request 
> > org.apache.catalina.connector.RequestFacade@d47c99
> > 2007-06-26 14:37:08,427 DEBUG [http-8080-exec-4] 
> > com.sebster.myservlet.TomcatCometServlet - 127.0.0.1:60578 POST 
> > /mycometservlet
> > 2007-06-26 14:37:08,432 DEBUG [http-8080-exec-4] 
> > com.sebster.myservlet.TomcatCometServlet - 
> > [24224039-a37e-40d0-a076-89d1df363390] read loop in BEGIN 
> event, input 
> > stream data available: 1
> > 2007-06-26 14:37:08,438 DEBUG [http-8080-exec-4] 
> > com.sebster.myservlet.TomcatCometServlet - 
> > [24224039-a37e-40d0-a076-89d1df363390] read loop done, input stream 
> > data available: 0
> > 2007-06-26 2:37:08.MD 
> org.apache.catalina.connector.CoyoteAdapter event
> > SEVERE: The servlet did not read all available bytes during the 
> > processing of the read event
> >
> > After this, the poller goes into an infinite event handling 
> busy loop.
> >
> > I looked at what the poller was doing, and it seems to be 
> setting the 
> > comet event into the END event type and trying to call the event 
> > method, however, it never arrives at my Comet processor's 
> event method 
> > (it seems to call an event method on an error valve or though). I 
> > don't know what exactly happens, but I can debug more if necessary.
> >
> > Does anybody know what the proper way to read ALL the data 
> is, and not 
> > cause this exception to happen?
> >
> > Regards,
> > Sebastiaan
> >
> >
> > 
> ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 

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


Re: read data/infinite loop problem with comet

Posted by Sebastiaan van Erk <se...@sebster.com>.
Hi all,

I looked in the Tomcat source code (6.0.13), and I really do not 
understand how I'm supposed to avoid the following error:

SEVERE: The servlet did not read all available bytes during the 
processing of the read event

What seems to be happening is this:

In my event method():
   while (request.getInputStream().available() > 0) {
      // read some data
   }
   // ***** NO MORE DATA AVAILABLE
   return;

A bit later in CoyoteAdapter (187):

                // *** SOME DATA ARRIVES SOMEWHERE HERE
                } else if (!error && read && request.getAvailable()) {
                    // If this was a read and not all bytes have been 
read, or if no data
                    // was read from the connector, then it is an error
                    error = true;
                    log.error(sm.getString("coyoteAdapter.read"));
                }
                return (!error);

I checked the source code, and CoyoteInputStream.available() and 
Request.getAvailable() both return exactly the same value, namely 
InputBuffer.available(). So it seems that between my return and this 
check new data arrived has arrived, causing failure. What's worse, my 
CometProcessor does not get notified (I don't know why) of the error, 
and the Poller goes in an infinite loop.

Does anybody know how I can solve this problem?

Regards,
Sebastiaan

Sebastiaan van Erk wrote:
> Hi,
>
> I'm having a problem reading data in my Comet servlet.
>
> In the BEGIN event I have the following loop:
>
>    while (request.getInputStream().available() > 0) {
>       // log that in read loop, log available()
>       // read some data
>    }
>    // log that read loop is done, log available()
>    return;
>
> However, even though I keep reading until available() returns 0, I get 
> a SEVERE error complaining I did not read all the available data, 
> which can be seen from the following logs:
>
> 2007-06-26 14:37:08,427 DEBUG [http-8080-exec-4] 
> com.sebster.myservlet.TomcatCometServlet - BEGIN event for request 
> org.apache.catalina.connector.RequestFacade@d47c99
> 2007-06-26 14:37:08,427 DEBUG [http-8080-exec-4] 
> com.sebster.myservlet.TomcatCometServlet - 127.0.0.1:60578 POST 
> /mycometservlet
> 2007-06-26 14:37:08,432 DEBUG [http-8080-exec-4] 
> com.sebster.myservlet.TomcatCometServlet - 
> [24224039-a37e-40d0-a076-89d1df363390] read loop in BEGIN event, input 
> stream data available: 1
> 2007-06-26 14:37:08,438 DEBUG [http-8080-exec-4] 
> com.sebster.myservlet.TomcatCometServlet - 
> [24224039-a37e-40d0-a076-89d1df363390] read loop done, input stream 
> data available: 0
> 2007-06-26 2:37:08.MD org.apache.catalina.connector.CoyoteAdapter event
> SEVERE: The servlet did not read all available bytes during the 
> processing of the read event
>
> After this, the poller goes into an infinite event handling busy loop.
>
> I looked at what the poller was doing, and it seems to be setting the 
> comet event into the END event type and trying to call the event 
> method, however, it never arrives at my Comet processor's event method 
> (it seems to call an event method on an error valve or though). I 
> don't know what exactly happens, but I can debug more if necessary.
>
> Does anybody know what the proper way to read ALL the data is, and not 
> cause this exception to happen?
>
> Regards,
> Sebastiaan
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

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