This forum has been archived. Please start a new discussion on GitHub.

Ice::DatagramLimitException: protocol error

Hi all.
I meet error in ICE.
The detail information is:"Subscriber: topoc publish failed: UdpTransceiver.cpp:123: Ice::DatagramLimitException: protocol error: maximum datagram paylaod size exceeded."

OS: windows xp sp2
ICE 3.2.1

There are one publisher used java with eclipse 3.5, and two subscribers, one subscribers we called SJ, used java with eclipse 3.4 and the other we called SC used cpp. Now, when the published message with byte[] type surpass 8k, the SC can not receive it and show the DatagramLimitException mentioned above, but the SJ can received without no exception. what's more, the SC connections be closed and can not receive any message published by this publisher(but can receive message by other publisher) .

Could this be solved by revise some configure files?

Any suggestions will be appreciated. Thanks a lots!

yours lee


  • dwayne
    dwayne St. John's, Newfoundland
    Please see the faq, specifically the second last paragraph.
  • Thanks for your reply.

    In fact, I hava set the Ice.MessageSizeMax in the start parameter list to a very big value.

    But still not work. Is this limited by OS? such as windows?

    I have solved this by another way.

    Thanks a lot.
  • dwayne
    dwayne St. John's, Newfoundland
    It is not Ice.MessageSizeMax that you need to set, it is Ice.UDP.SndSize and Ice.UDP.RcvSize.
    For UDP messages, Ice uses two additional properties, Ice.UDP.SndSize and Ice.UDP.RcvSize. (Note that the value of these properties is in bytes, not kilobytes.) These properties determine the maximum size for the sending and receipt of UDP messages. The default value depends on your operating system. (Typical defaults are 64kB on Windows, and 8kB on Linux.) The maximum sensible value for these properties is 65535 (64kB). You can set them to larger values, but doing so merely increases the size of the kernel buffers and does not affect the hard limit of 65507 bytes for the payload of a UDP packet. (It follows that, for UDP, the maximum Ice message size, including protocol overhead, is 65507 bytes because that is the limit imposed by UDP.) If you set Ice.MessageSizeMax in addition to the UDP send/receive size, the smaller of the property settings applies.