uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaroslaw Cwiklik <uim...@gmail.com>
Subject Re: UIMA-AS CAS consumers of different Clients using same connection to Database
Date Mon, 18 Apr 2011 13:24:00 GMT
It appears that your database connection is static, meaning it seems to be
shared by the two Cas Consumer threads.
This seems like the right thing to do. Database connections are typically
heavy and expensive to create. If this is appropriate for your application,
keep one connection open and reuse it. I dont understand why you need to
create a new connection to the same database ( I am assuming this) and than
close it when you done processing request. Just to do this again for a
subsequent request.


On Mon, Apr 18, 2011 at 2:19 AM, Arun Tewatia <arun.tewatia@orkash.com>wrote:

> Hi all,
> I am using UIMA-AS 2.3.0 release. I run an aggregate with 2 Cas consumers
> written in deployment descriptor.
> The cas consumers output processed data in Postgres database server. I
> close the connection created with the database at the end in the cas
> consumers.
> When i send request from 1 client, it works fine. The data is written to
> database and all connections with the database are released after
> completion. But when i send request from 2 or more clients simultaneously,
> then in that case, as the processing of 1st client completes, the processing
> of other clients halts immediately giving error " The Connection is closed
> ".
> When i comment out the lines closing the connection at the end of cas
> consumers, it works fine. But then the connections to database are not
> released and hence the RAM utilization keeps on increasing until all of the
> available memory is consumed. So it looks like all the cas consumers of
> different client requests are using the same connections to database.
> What can be possible cause of this ? I think each client should create it's
> own new connections to database !
> Thanks
> Arun Tewatia !

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