2

Hi I have written a C# client/server application using the Zeroc Ice communication libary (v3.4.2).

I am transferring a sequence of objects from the server which are then displaying them in the client in a tabular format. Simple enough.

I defined following slice types

enum DrawType { All, Instant, Raffle };

struct TicketSoldSummary {
  int scheduleId;
  DrawType dType;
  string drawName;
  long startDate;
  long endDate;
  string winningNumbers;
  int numTicket;
  string status;
};
sequence<TicketSoldSummary> TicketSoldSummaryList;

interface IReportManager {
  [..]
  TicketSoldSummaryList getTicketSoldSummary(long startTime, long endTime);
};

When I call this method it usually works fine, but occasionally (approx 25% of the time) the caller gets a Ice::MemoryLimitException. We are usually running 2-3 clients at a time.

I searched on the Internet for answers and I was told to increase Ice.MessageSizeMax, which I did. I have increased MessageSizeMax right up to 2,000,000 Kb, but it made no difference, I just did a test with 31,000 records (approximately 1.8 Megs of data) and still get Ice.MemoryLimitException. 1.8 Megs is not very big!

Am I doing something wrong or is there a bug in Zeroc Ice?

Thanks so much to anyone that can offer some help.

Paul C
  • 23
  • 4
  • Have you determine in what situation this exception is thrown. Are you able to look at the source code for this library? – Security Hound Dec 08 '11 at 17:02
  • Thanks for the reply. This error is supposed to happen when the data size is larger than the MessageSizeMax, but in my case it seems to be more related to the network speed. For example over VPN I get the error 90% of the time, but over LAN only 25% of the time – Paul C Dec 08 '11 at 18:15
  • It would be useful if you could also post your configuration files. For example, is MessageSizeMax set on all the components (server, client, the Glacier2 router if you are using it)? It'd also be good to see the exception to know which component is throwing. – Josh Dec 09 '11 at 07:55

2 Answers2

0

I believe MessageSizeMax needs to be configured on the client as well as the server side. Also have tracing enabled with max value (3) and check the size of the messages (on the wire)

0

Turn on Ice.Warn.Connections on the server side and see the logs. Also make sure the client max message size gets applied correctly. I set Ice.MessageSizeMax on the client as below,

Ice.Properties properties = Ice.Util.createProperties();
properties.setProperty("Ice.MessageSizeMax", "2097152");//2gb in kb
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = properties;
Ice.Communicator communicator = Ice.Util.initialize(initData);
Nemo
  • 3,285
  • 1
  • 28
  • 22