Results 1 to 2 of 2

Thread: Icepack registry "TimeOut" exception with heavy load

  1. #1
    eaglecn is offline Registered User
    Name: Yong WANG
    Organization: ICT,china
    Project: DBroker
    Join Date
    Jan 2005
    Location
    beijing
    Posts
    17

    Icepack registry "TimeOut" exception with heavy load

    We've got two servers, each deploys a icepacknode which manages it's local service. Only one icepackregistry is used. We increase concurrent client number gradually and when exceeds some number, checkedCast throw Timeout Exception
    ==============
    statement :
    query =
    IcePack::QueryPrx::checkedCast(ic->
    stringToProxy
    ("IcePack/Query"));

    Exception:
    ConnectionI.cpp:127: Ice::ConnectTimeoutException:
    timeout while establishing a connection
    ==============
    original code is following:
    Code:
            for (i = 0; i < 2; i++) {
                Ice::PropertiesPtr props1 = Ice::createProperties();
                props1->setProperty("Ice.Default.Locator",
                                    "IcePack/Locator:default -p 12000  -t 100 -h "
                                    + reg[i]);
                props1->setProperty("IcePack.Registry.Client.Endpoints",
                                    "default -p 12000 -t 100 -h " + reg[i]);
                props1->setProperty("Ice.MessageSizeMax", "102400");
     
                props1->setProperty("Ice.Warn.Leaks", "0");
                try
                {
                 ic = Ice::initializeWithProperties(argc, argv, props1);
                }
                catch(const Ice::ConnectTimeoutException &ex){
                  errorStr = ex.ice_name();
                  continue;
                }
                try {
                    query =
                        IcePack::QueryPrx::checkedCast(ic->
                                                       stringToProxy
                                                       ("IcePack/Query"));
                    int j = 0;
                    registerflag = true;
                    for (j = 0; j < 20; j++) {
                        try {
                            base =
                                query->
                                findObjectByType("::NetDB::MBatchStatement");
                            batch = MBatchStatementPrx::checkedCast(base);
                            if (batch) {
                                flag = true;
                                break;
                            }
                        }
                        catch(const Ice::Exception & ex) {
                            cout <<"service========"<< ex << endl;
                        }
                    }
                   if (j != 20)
                        break;
                }
                catch(const Ice::Exception & ex) {
                    errorStr = ex.ice_name();
                    cerr<<"registry=========="<<ex<<endl;
                    ic->destroy();
                }
            }
    when a server is down, the error will appear more quickly.

  2. #2
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    You have the timeout set to 100ms, which isn't a very long time -- especially once the server gets loaded... What do you find suprising in this scenario?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 01-28-2009, 06:15 AM
  2. about "IceGrid.Registry.Admin"
    By richardma in forum Help Center
    Replies: 1
    Last Post: 11-15-2007, 07:36 AM
  3. Unknow exception in "Printer" sample code
    By wangh705 in forum Help Center
    Replies: 6
    Last Post: 10-26-2006, 12:01 PM
  4. Replies: 4
    Last Post: 10-26-2006, 11:23 AM
  5. IceGrid and its definition of "load"
    By Mobiwan in forum Comments
    Replies: 4
    Last Post: 11-19-2005, 02:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •