[keycloak-user] Mongo DB Connections Issue
Marek Posolda
mposolda at redhat.com
Thu Oct 30 06:22:17 EDT 2014
Hi,
We are using MongoClient, which has it's own connection pooling
mechanism. The default size of connection pool is 100 connections.
When MongoClient needs to do some DB operation, it opens new connection
and put it to connection pool until there are 100 connections here. Once
there are 100 connections, it stops open new connections, but it will
start to reuse existing ones instead.
As of now, we don't support configuration of connection pool in
Keycloak, but I've added https://issues.jboss.org/browse/KEYCLOAK-799,
which will be available in next 1.1.0.Beta1 version. Then you will be
able to add this to mongo configuration in keycloak-server.json:
"connectionsPerHost": 10
to limit size of connection pool to 10 connections for example. You will
be also able to configure other options related to connections and
connection pooling.
Marek
On 30.10.2014 02:59, prab rrrr wrote:
> I configured Keycloak 1.0.3 to use Mongodb and created a new realm,
> added a user and deleted the user. While doing so I noticed that
> Keycloak opens 1 connection each for almost any update/insert/delete
> and it doesn't close them. 24 Connections were opened for 1 user
> performing those operations and they remained open even after 3 hrs of
> inactivity.
>
> Can a fix be put in for this issue?
>
>
>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20141030/f2814c97/attachment-0001.html
More information about the keycloak-user
mailing list