uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaroslaw Cwiklik <uim...@gmail.com>
Subject RE: Error handling parameters in CPE with a Vinci processor
Date Tue, 24 Mar 2009 20:53:02 GMT
Olivier, that is the line that needs to be substituted

Jerry C


Thanks Jaroslaw

I'll give it a try and keep you posted.

Can you confirm that the last block

if ( sleepBetweenRetries ) {
wait(maxTimeToWait);
} else {
sleepBetweenRetries = true;
}

have to substitute the previous line of code

wait(SLEEP_TIME);

Regards

Olivier


________________________________

         De : Jaroslaw Cwiklik [mailto:cwiklik@us.ibm.com]
         Envoyé : mardi 24 mars 2009 15:16
         À : uima-user@incubator.apache.org
         Objet : Re: Error handling parameters in CPE with a Vinci processor



         Olivier, I suspect that what you see is a bug. A quick fix for this
problem is below. Code in red is new. Apply it
         and send us a patch.

         private synchronized boolean
activateProcessor(CasProcessorConfiguration aCasProcessorConfig,
         String aService, ProcessingContainer aProcessingContainer, boolean
redeploy)
         throws Exception {

         boolean tryAgain = true;
         int maxCount = aCasProcessorConfig.getMaxRestartCount();
         int maxTimeToWait =
aCasProcessorConfig.getMaxTimeToWaitBetweenRetries();
         // Never sleep indefinitely. Override if the maxTimeToWait = 0
         if (maxTimeToWait == 0) {
         maxTimeToWait = WAIT_TIME;
         }
         // Initially dont sleep
         boolean sleepBetweenRetries = false;
         while (tryAgain) {
         try {
         if ( sleepBetweenRetries ) {
         wait(maxTimeToWait);
         } else {
         sleepBetweenRetries = true;
         }

         .....

         Jerry C
         ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
         Jerry Cwiklik
         UIMA Extensions
         IBM T.J. Watson Research Center
         Hawtorne, NY, 10532
         Tel: 914-784-7665, T/L: 863-7665
         Email: cwiklik@us.ibm.com

         Inactive hide details for "Olivier Terrier" <
olivier.terrier@temis.com>"Olivier Terrier" <olivier.terrier@temis.com>




                                    "Olivier Terrier" <
olivier.terrier@temis.com>

                                    03/24/2009 06:14 AM

         Please respond to
uima-user@incubator.apache.org



To

<uima-user@incubator.apache.org>


cc




Subject

Error handling parameters in CPE with a Vinci processor


         Hi all

         We are a little bit puzzled about the handling of the error
handling parameters of a CPE that has a Vinci remote Cas processor with its
"service-access" deployment parameter set to "random"

         We set the error parameters to the following values:

          <errorHandling>
          <errorRateThreshold action="continue" value="10/1000" />
          <maxConsecutiveRestarts action="continue" value="7"
waitTimeBetweenRetries="10000" />
          <timeout max="600000" default="-1" />
          </errorHandling>

         And it looks like, when our Vinci processor fails for some reason,
the CPE intents gracefully to reconnect up to N times (N=10 which is the
value of the maxConsecutiveRestarts parameter) which is the expected
behaviour. But the "waitTimeBetweenRetries" delay is not used at all.
Apparently a delay near 2 secs is used as you can see in the following log
events:


         20/03/09 10:30:46 - 49:
org.apache.uima.collection.impl.cpm.container.deployer.VinciTAP.initialize:
ATTENTION: The system is unable to connect to the service host
uima.consumer.DocumentConsumer.5019 through the service port . (Thread Name:
[Procesing Pipeline#1 Thread]::)
         20/03/09 10:30:49 - 49:
org.apache.uima.collection.impl.cpm.container.deployer.VinciTAP.initialize:
ATTENTION: The system is unable to connect to the service host
uima.consumer.DocumentConsumer.5019 through the service port . (Thread Name:
[Procesing Pipeline#1 Thread]::)
         20/03/09 10:30:51 - 49:
org.apache.uima.collection.impl.cpm.container.deployer.VinciTAP.initialize:
ATTENTION: The system is unable to connect to the service host
uima.consumer.DocumentConsumer.5019 through the service port . (Thread Name:
[Procesing Pipeline#1 Thread]::)
         20/03/09 10:30:53 - 49:
org.apache.uima.collection.impl.cpm.container.deployer.VinciTAP.initialize:
ATTENTION: The system is unable to connect to the service host
uima.consumer.DocumentConsumer.5019 through the service port . (Thread Name:
[Procesing Pipeline#1 Thread]::)
         20/03/09 10:30:55 - 49:
org.apache.uima.collection.impl.cpm.container.deployer.VinciTAP.initialize:
ATTENTION: The system is unable to connect to the service host
uima.consumer.DocumentConsumer.5019 through the service port . (Thread Name:
[Procesing Pipeline#1 Thread]::)
         20/03/09 10:30:57 - 49:
org.apache.uima.collection.impl.cpm.container.deployer.VinciTAP.initialize:
ATTENTION: The system is unable to connect to the service host
uima.consumer.DocumentConsumer.5019 through the service port . (Thread Name:
[Procesing Pipeline#1 Thread]::)
         20/03/09 10:30:59 - 49:
org.apache.uima.collection.impl.cpm.container.deployer.VinciTAP.initialize:
ATTENTION: The system is unable to connect to the service host
uima.consumer.DocumentConsumer.5019 through the service port . (Thread Name:
[Procesing Pipeline#1 Thread]::)
         20/03/09 10:31:01 - 49:
org.apache.uima.collection.impl.cpm.container.deployer.VinciTAP.initialize:
ATTENTION: The system is unable to connect to the service host
uima.consumer.DocumentConsumer.5019 through the service port . (Thread Name:
[Procesing Pipeline#1 Thread]::)
         20/03/09 10:31:01 - 49:
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDeployer.initialize:
ATTENTION: Service Connection Exception. Max number of retries reached.
(Thread Name: [Procesing Pipeline#1 Thread]::) Service Name:
uima.consumer.DocumentConsumer.5019 Max Retry Count: -1
         20/03/09 10:31:01 - 49:
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDeployer.initialize:
ATTENTION: The Max Restart Count value 7 exceeds the allowed limit. (Thread
Name: [Procesing Pipeline#1 Thread]::) Service Name:
consumer_1224757309781_repo5019_27


         I had a look at the implementation of the class
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDeployer

         And actually in the method

          private int attachToServices(boolean redeploy, String aServiceUri,
int howMany,
                  ProcessingContainer aProcessingContainer) throws
Exception;

         It is clear that the "sleepBetweenRetries" only occurs if the Vinci
Cas processor is in "exclusive" mode.
         On the contrary (random mode) the method calls directly the method

          private synchronized boolean
activateProcessor(CasProcessorConfiguration aCasProcessorConfig,
                  String aService, ProcessingContainer aProcessingContainer,
boolean redeploy);

         Which uses a hard coded timeout of 1 sec (SLEEP_TIME) between each
retries instead of the waitTimeBetweenRetries.

         Someone can tell me if this is the intended behaviour and why it is
not consistent in exclusive/random modes?

         Thanks in advance

         Olivier Terrier
         Core Products Software Development Manager
         TEMIS S.A.
         Text Intelligence in your daily business
         5, Rue du Tour de l'Eau
         38400 Saint Martin d'Hères - France
         Direct: +33 (0)4 56 38 24 06
         Mobile: +33 (0)6 60 36 93 11
         Visit our website! www.temis.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message