Return-Path: Delivered-To: apmail-incubator-uima-user-archive@minotaur.apache.org Received: (qmail 51371 invoked from network); 31 Mar 2010 15:22:29 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 31 Mar 2010 15:22:29 -0000 Received: (qmail 25045 invoked by uid 500); 31 Mar 2010 15:22:29 -0000 Delivered-To: apmail-incubator-uima-user-archive@incubator.apache.org Received: (qmail 25014 invoked by uid 500); 31 Mar 2010 15:22:29 -0000 Mailing-List: contact uima-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: uima-user@incubator.apache.org Delivered-To: mailing list uima-user@incubator.apache.org Received: (qmail 25006 invoked by uid 99); 31 Mar 2010 15:22:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Mar 2010 15:22:29 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL,T_TO_NO_BRKTS_FREEMAIL,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [77.238.184.63] (HELO smtp132.mail.ukl.yahoo.com) (77.238.184.63) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 31 Mar 2010 15:22:24 +0000 Received: (qmail 85802 invoked from network); 31 Mar 2010 15:22:02 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.fr; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=Wu6i+Zws0A9b7C9/t8IdiTb69IZ08w4E+0XFNAmMgGPmab+7Bvcj/uClDqAs6/c+tumapDANeNbXV1Rl+B5xa4kDlhEMS+uCRtIbamu3KnkEB44xeApL1gDSTS87fkCAF0vp28YeIF/7heTTWnn1QcbXW9YRgQSlQg0bxee5IIQ= ; Received: from cap69-2-82-241-215-62.fbx.proxad.net (ppujalon@82.241.215.62 with plain) by smtp132.mail.ukl.yahoo.com with SMTP; 31 Mar 2010 15:22:02 +0000 GMT X-Yahoo-SMTP: 9lnues6swBDYRhFC_VmDFrQdhTEK X-YMail-OSG: jIOYXokVM1kYVVK..Tk4Z_UVqzQgJ2lyrUsXGW3ZRQwSTbcaCmp0Nynctd0dEFiPAXdUdkkoco0MTgbf8GDP44oGxJ1cP7xrWa4ortCWNJqFh_8njkXy_NAYghq.JcUHPNHKseCZWuUooRUDfwVMVc4.PKzBuY3FmIXv6ThShoj7CACN7YNuL0xcrQl5b3FXO9xnrWlepoMU8yFh.VPISe3kXeSlnrmCw7SS5ujy8kxPm83Ul7I2MzHrfPwyp4em5omelWcP8qv7XhQp3M_6DoxtP5VL_54- X-Yahoo-Newman-Property: ymail-3 Message-ID: <4BB3689A.7010006@yahoo.fr> Date: Wed, 31 Mar 2010 17:22:02 +0200 From: pierre yahoo User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.9.1.8) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3 MIME-Version: 1.0 To: uima-user@incubator.apache.org Subject: Re: UIMA-AS client is blocking References: <4BB1C759.7030306@yahoo.fr> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Interestingly enough, I already read this part of the documentation and I was releasing the CAS in my first implementation, but it didn't help..... - If I release the CAS just after calling the sendCAS, it was not actually processing the CAS (or at least the callback listener was never called). The blocking situation is occuring... I have the following logs : "ERROR:org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl.:onMessage:NullPointerException" - I tried to release the CAS in the callback listener, the blocking situation was the same and I have the following warning log on release "WARNING :org.apache.uima.util.CasPool : releaseCas: The system tried to return a common analysis structure to the pool from which it was not checked out. " - I looked at the process method of BaseUIMAAsynchronousEngineCommon_impl and saw the CAS are not released there (see below) nor in the implementation of the test callback implementation..... do { if(!initialized || !running) break; try { if(!(hasNext = collectionReader.hasNext())) break; cas = getCAS(); collectionReader.getNext(cas); sendCAS(cas); } catch(Exception e) { e.printStackTrace(); } } while(true); I am really confused.... Where should I release the CAS ? Thanks Pierre Le 31/03/2010 15:52, Jaroslaw Cwiklik a �crit : > You are not calling cas.release() when you are done with the CAS. > Per UIMA AS documentation ("4.2 The UimaAsynchronousEngine Interface - CAS > getCAS()" > > "...CAS getCAS(): Requests a new CAS instance from the CAS pool. This method > blocks until a free instance of CAS is available in the CAS pool. > Applications that > use getCAS() need to call CAS.reset() before reusing the CAS, or > CAS.release() > to return it to the Cas pool." > > The release() places a CAS back into the pool so the subsequent call to > getCAS() > succeeds. An alternate strategy is to have a single CAS instance in the CAS > pool > call getCAS() to get that instance and enter a while loop. When done > processing > reply, call cas.reset() and do *not* call getCAS() again. > > JC > > On Tue, Mar 30, 2010 at 5:41 AM, pierre yahoo wrote: > > >> I'm trying to use UIMA-AS to scale a part of the process of our >> application. >> I have successfully deployed our process as asynchronous services but I >> have tremendous issues with the client. >> >> I'm basically looping synchronously(one at a time) on the following code. >> CAS cas = uimaEEEngine.getCAS(); >> JCas jcas; >> try { >> jcas = cas.getJCas(); >> } catch (CASException e) { >> throw new ResourceProcessException(e); >> } >> fillCas(jcas); >> uimaEEEngine.sendCAS(cas); >> >> When I run the application, the client works fine for a while and suddenly >> gets stuck waiting on cas.getJCas().. >> I have checked that the asynchronous service have processed all the >> previous CAS. The service is still up and running as I can send requests >> from an another client. >> When I tracked down who locks the process, I can see that the semaphore on >> CasQueueEntry is not released. >> When I looked further, I noticed that the all process is basically lock >> when the CasManager_Impl is calling CasPool.getCas(0) . The CasPool is then >> waiting with no timeout for someone to notify it. >> >> I try to change the size of the client CasPool but it didn't really fix the >> issue. Just pushing further the lock... >> >> Does anyone have ever experienced this? Am I doing something wrong ? >> >> Pierre >> >> >