Return-Path: Delivered-To: apmail-incubator-uima-user-archive@minotaur.apache.org Received: (qmail 26617 invoked from network); 31 Mar 2010 13:52:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 31 Mar 2010 13:52:39 -0000 Received: (qmail 29427 invoked by uid 500); 31 Mar 2010 13:52:39 -0000 Delivered-To: apmail-incubator-uima-user-archive@incubator.apache.org Received: (qmail 29336 invoked by uid 500); 31 Mar 2010 13:52:38 -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 29328 invoked by uid 99); 31 Mar 2010 13:52:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Mar 2010 13:52:38 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of uimaee@gmail.com designates 209.85.160.47 as permitted sender) Received: from [209.85.160.47] (HELO mail-pw0-f47.google.com) (209.85.160.47) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Mar 2010 13:52:32 +0000 Received: by pwj5 with SMTP id 5so105264pwj.6 for ; Wed, 31 Mar 2010 06:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type; bh=HUDA8WFk3sarqAM1Ww7WdyHl5+ArwyWSnAP2gNzrMqI=; b=gecjo9FaLjpw5Df6mb9JleSqNazFbgfmE+Og7ZrsNuqoxe+55wfSa1V8BY7J7Ivxeo QA6qHgwXFrGff+WeRKVOQ7FovV5dyBuPFiBniIBCjgWbS4yPu64VMLITLFj/+e2egoQY Iudp8478SdabWwY5gjj7nxQsUlR9DE81dzeqM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ux3fpHz8xpE6S85vFz5jJftVot3yEwbY4qgY5pwmg5rQMGNhGATV4fgV1x6Jtq94HH A9VwJuM3LWDCe+gU+C7NPPKUo6cBtWgXbIFtnCObxukq54IhybTIeFDjmxGbeD1+IBSQ TxGbCMd+qvyhOeIZlcCKUSywf77+hf9T7612c= MIME-Version: 1.0 Received: by 10.114.39.2 with HTTP; Wed, 31 Mar 2010 06:52:07 -0700 (PDT) In-Reply-To: <4BB1C759.7030306@yahoo.fr> References: <4BB1C759.7030306@yahoo.fr> Date: Wed, 31 Mar 2010 09:52:07 -0400 Received: by 10.114.188.22 with SMTP id l22mr2434498waf.154.1270043527917; Wed, 31 Mar 2010 06:52:07 -0700 (PDT) Message-ID: Subject: Re: UIMA-AS client is blocking From: Jaroslaw Cwiklik To: uima-user@incubator.apache.org Content-Type: multipart/alternative; boundary=0016e64ca50454b1b10483190ddc X-Virus-Checked: Checked by ClamAV on apache.org --0016e64ca50454b1b10483190ddc Content-Type: text/plain; charset=ISO-8859-1 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 > --0016e64ca50454b1b10483190ddc--