The patch does not increase the buffer size to 64M. It instead parsed the message directly off of the connection. The 64M is a sanity check against the message size. Each message is preceded by a integer stating the message size and this needs to be sanity checked. The 64M number could just as easily be changed to 100GB and the amount of memory used would be the same (for a given mesage stream).
As for 64M as a sane limit, the sender of the messages (the wave server) is constrained by the same limit. Protocol Buffers has a default limit of 64M per message. So unless that limit is changed, the server cannot create a message larger than 64M. -Tad On Fri, Jul 30, 2010 at 1:38 AM, Mathijs <[email protected]> wrote: > Thanks, I'll use that patch then. > > I see the buffer is increased to 64M. > Would it still be possible that (on a very unusual wavelet with > thousands of deltas) 64M becomes too small? > I mean the issue (as you describe), is that too many deltas are sent > at once. > Are there any guards in place to make sure this doesn't happen? > I agree that a wavelet with 64M of deltas doesn't sound plausible in a > real-use situation, but technically, increasing the buffer sounds like > postponing the problem a bit. > > > > On Jul 29, 7:01 pm, Tad Glines <[email protected]> wrote: > > A recent commit to the io2010 branch ( > http://code.google.com/p/wave-protocol/source/detail?r=974c43ba8589ff...) > > should resolve this issue. If you are still using the main branch and not > > the io2010 branch, then you can fix the problem by increasing the buffer > > size on line 94 ("final int bufferSize = 8192 * 4;") of > > SequencedProtoChannel.java. The reason you see the problem is that even > > without the snapshot feature, the first ProtocolWaveletUpdate message > > contains most if not all the deltas from the wavelet. > > > > -Tad > > > > On Thu, Jul 29, 2010 at 9:06 AM, Mathijs <[email protected]> > wrote: > > > Hi all, > > > > > For testing correctness and performance of a customized FedOne server, > > > I wrote a testing utility that acts like many clients connecting and > > > typing to waves at the same time. > > > > > I ran it agains "vanilla" FedOne for comparison and found an issue > > > there. > > > > > The issue reveals itself with the error: > > > java.lang.IllegalStateException: Payload (35181 bytes) too large for > > > buffer (32768 bytes) > > > > > It happens when I fire up a ClientBackend and open a wavelet that had > > > lots of activity in the past (somewhere between 150 and 200 deltas). > > > > > The deltas are sent from the server to the client 1 by 1 (not using > > > snapshotting feature) > > > Individual deltas (protobuf messages) are way below 32k, but -as I > > > read the code- SequencedProtoChannel does not try to parse messages > > > (and find out they are <32k) if the channel has >32k waiting. > > > > > Is there a reason for this behavior? > > > Would changing the buffer size help or just postpone the problem? > > > > > Thanks, > > > Mathijs > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Wave Protocol" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<wave-protocol%[email protected]> > <wave-protocol%[email protected]<wave-protocol%[email protected]> > > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/wave-protocol?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Wave Protocol" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<wave-protocol%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/wave-protocol?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Wave Protocol" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/wave-protocol?hl=en.
