[Spread-users] Invalid message in high load group
pradysam at yahoo.co.in
Thu Sep 1 05:56:02 EDT 2005
We had a similar problem with spread when we loaded it
quite a bit. First of all I suggest that you use
message type "UNRELIABLE_MESS".
When we did this the frequency of the problem did
decrease but continued to happen.
In this case there a workaround has been implemented
in the file SpreadConnection.java which I have
attached with this file.
Note: There exists a high risk of losing messages and
is *NOT* a very safe workaround.
Hope this helps,
--- Marcin Kuthan <mkuthan at pit.edu.pl> wrote:
> Hi All
> I have a problem with Java clients on high load
> group. Header of spread
> message is not decoded correctly, and
> java.lang.OutOfMemoryError is
> thrown. Java spread client expect following header
> 1. type (4 bytes)
> 2. sender (MAX_GROUP_NAME bytes) - typically 32
> 3. numGroups (4 bytes)
> 4. hint (4 bytes)
> 5. dataLen (4 bytes)
> But on high load group I sometimes receive another
> 1. type is missing, header start with group name
> (NOT sender, length
> looks like MAX_GROUP_NAME)
> 2. next four bytes contains 0,0,0,28 (decimal)
> 3. next four bytes contains 2,0,0,0 (decimal)
> 4. next four bytes contains 10,0,0,0 (decimal)
> 5. next four bytes contains -123,0,0,0 (decimal)
> numGroups field is decoded to very large number and
> allocation of byte
> array throws an OutOfMemoryError. Even if I check
> numGroups size and
> error is not thrown my clients will not receive any
> new messages.
> When I turn on SESSION debug flag in spread.conf I
> get following logs:
> Sess_badger: for mbox 9
> High load environment is mean about 10.000 msg/sec.
> My software:
> OS: Linux woody (gcc 2.95, libc 2.2.5)
> spread: 3.17.3 (with MAX_SESSION_MESSAGES set to
> java: 1.4.2_08
> Any help would be appreciated.
> Telecommunication Research Institute
> Poligonowa 30, 04-051 Warszawa, Poland
> Marcin Kuthan
> mail: mkuthan at pit.edu.pl
> phone: +48 (22) 486-53-46
> Spread-users mailing list
> Spread-users at lists.spread.org
Visit me at http://rtns.org/prady/
Mail : pradysam (at) yahoo (dot) co.in
Start your day with Yahoo! - make it your home page
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 68935 bytes
Url : http://lists.spread.org/pipermail/spread-users/attachments/20050901/f4d1a014/attachment.bin
More information about the Spread-users