Problem

The python ORB (omniORB) has a maximum message size

Solution

Q: I am getting a strange CORBA marshalling exception when I send large data sets (i.e. data as parameters in a CORBA method call) to/from a python client/server. Why?

A: You may be hitting omniORB's (default) maximum message size

If you see an exception that looks like this:


omniORB.CORBA.MARSHAL: Minor: 0x54410000, COMPLETED_NO.

or perhaps like this:


MARSHAL: CORBA.MARSHAL(omniORB.MARSHAL_MessageSizeExceedLimitOnClient, CORBA.COMPLETED_NO)

and the problem only occurs for data larger than ~2MB, you are hitting the (default) limit for a message sent via CORBA using python's omniORB. The default limit is 2MB. You can change this limit in three ways (NOTE: set this value on the client side if the client is in python, the server side if the server is in python, and both sides if both client and servant are in python):

  • 1) by setting the ORBgiopMaxMsgSize environment variable on the client and/or server side
  • 2) programmatically
  • 3) via a command-line switch to the ORB.

The easiest way to change this setting is to simply set the ORBgiopMaxMsgSize environment variable to a larger value, but if for some reason you prefer to use one of the other techniques, the details can be found here.