Archived

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

IceBox problem

Hi all!


When in my service cast exception, its Ice Box is crushed and its all other services... How make that other services continue work(Ice Box was not crashed)? and other question how know which service is crashed?

Comments

  • I m make remote monitoring system and need known which service is crashed.
  • benoit
    benoit Rennes, France
    Hi,

    Can you please provide more information? Which Ice version do you use and which language mapping? Are you getting an error from the faulty service or is the server causing the IceBox process to abort?

    Cheers,
    Benoit.
  • Hi, Benoit

    My target is remotely monitoring services and servers in IceGrid and if something of it are crashed i can known this.

    My version Ice 3.5,
    language mapping C#.

    I m make service(name Crash Service).When this service get request, its cast exception,then all other services with IceBox are crashed. I try remotley monitoring this crash.

    For this i use admin object("Metrics"), if this object prx is no longer reachable, i m signal about crash IceBox.(This is good idea? Or there is an alternative?)

    1.But how remotely know which service is cast exception and crashed?
    2.And can i prevent crash all other services with Ice Box ? (When exception is cast in service, all other services go continue its work.)
  • benoit
    benoit Rennes, France
    Can you detail what kind of "crash" or exception you want to deal with?

    A service throwing an exception shouldn't cause it to "crash". If the exception is raised from a servant dispatch it will propagate to the Ice runtime and cause a warning to be printed out if Ice.Warn.Dispatch is enabled. The client will get an Ice unknown exception and the service should still be able to accept new dispatch. It shouldn't affect other services.

    Pinging the metrics admin object of a given service won't give you any hints on the health of the service, as explained in this other thread, this object is hosted by the IceBox server and it's independent from the service, it will be reachable as long as the IceBox server is reachable and regardless of the service state.

    Cheers,
    Benoit.
  • I m cast exception in service StackOverflowException.

    code servant:
    <code>
    class Crash : MyCrash.CrashedDisp_
    {
    public override void MakeCrash(Ice.Current current__)
    {
    RecursiveFunction();
    }

    private void RecursiveFunction()
    {
    RecursiveFunction();
    }

    }

    </code>

    when this function use, all other services are crashed with this Ice Box;

    I m understand that for IceBox reachable(its state) is good idea using admin object metrics?
  • Yeah if cast the other exception, I get warning. But stackoverflow is crashed IceBox.
  • if usually cast each exception i get warning, but if use my recursive function (see above)
    IceBOX is crashed.
  • class Crash : MyCrash.CrashedDisp_
    {
        public override void MakeCrash(Ice.Current current__)
        {
            CastException();
        }
    
        public override void MakeCrashRecursiveFunction(Ice.Current current__)
        {
            RecursiveFunction();
        }
    
        private void RecursiveFunction()
        {
            RecursiveFunction();
        }
    
        private void CastException()
        {
            throw new StackOverflowException();
        }
    
    }
    
    


    if client use prx and call MakeCrashRecursiveFunction() - ice box is crashed
    if client use prx and call MakeCrash() - ice box is okey, i get only warning, i get name Ice box, name service and exception, how get this info remotely?


    Okey, this different conceptions, but thus one service can be destroy all other services with IceBox. is it?
  • benoit
    benoit Rennes, France
    Yes, an IceBox service can cause an error that is not recoverable and that can cause other services to die, this is the case with the StackOverflowException error and it will also probably the case with an OutOfMemoryException error.

    See Microsoft documentation on the StackOverflowException: StackOverflowException Class (System)

    There's actually no way for a program to catch it.

    If your services need to be fully isolated, you should use one service per IceBox process. Fortunately, with IceGrid deploying and managing server processes is easy so this shouldn't be too complicated.

    Cheers,
    Benoit.
  • Thank you very much!