Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-667

Occasionally, messages get too large for the UDP transport

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.6.2, 2.7
    • None
    • None
    • Workaround Exists
    • Hide

      #1 Set frag_size in FRAG2 to a smaller value
      #2 Set max_bundle_size in TP to a smaller value too
      OR
      #3 Disable bundling in TP (may be slower though).

      Show
      #1 Set frag_size in FRAG2 to a smaller value #2 Set max_bundle_size in TP to a smaller value too OR #3 Disable bundling in TP (may be slower though).

      When message bundling is enabled (say max_bytes=60K), every now and then we get a larger message (say 70K), and then the msg is dropped because UDP has a size limit of 65K.

      This can happen as follows:

      • Either magic-map.xml is not found or some headers are not in magic-map
      • Say we accumulated 100 messages in the message bundler. Before adding a new message, the bundler
        checks its size (Message.size()), which calls size() on all headers
      • A header just assumes it has a magic number and returns its size, including 2 bytes for the magic number (a
        short)
      • If magic-number.xml is not found, or some headers have no magic number, then we write the fully qualified
        classname of the class into the stream. So let's assume that's 30 bytes versus the 2 size() returned.
      • If we have 3 headers/msg which have the additional 28 bytes, and 100 messages, then the serialized
        message is 8400 bytes larger than what Message.size() returned
      • So the marshalled message is now 68400 bytes and it will get discarded by UDP !

              rhn-engineering-bban Bela Ban
              rhn-engineering-bban Bela Ban
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: