Ejabberd always connected to mysql (Sleeping)

Hello,

I installed ejabberd 2.0.3 with a mysql database and it works fine.
But i still have something bothering me.
Ejabberd is installed on a 4 servers cluster, all connecting to the same database.

I set maximum number of mysql connections in my config file
{odbc_pool_size, 10}. (Yes even if 10 is default :) )
I also defined the "keepalive time" of those connections
{odbc_keepalive_interval, 3600}.

BUT, when i look at mysql process list, i can see that i have 40 sleeping mysql connections. 10 for each server.
My problem is that i don't want mysql to be used by ejabberd when not necessary. It uses 40 connections even if no one is connected on my servers.

Is there a way to tell ejabberd no to use those connections when it s unnecessary ?
So that mysql can free those connections.

Thanks

Not configurable

drzoidberg wrote:

i can see that i have 40 sleeping mysql connections. 10 for each server.

Right, ejabberd opens the 10 connections when it is started, and the connections are never closed. The ejabberd Guide mentions it:

Quote:

By default ejabberd opens 10 connections to the database for each virtual host.

drzoidberg wrote:

Is there a way to tell ejabberd no to use those connections when it s unnecessary ?
So that mysql can free those connections.

Not possible: I don't see any option for that, and I am not aware of any patch that implements that.

10 x 4 = 40

1 x 4 = 4.
Why do not you change the 10 to 1 or 2 or ...?

Ok thanks a lot to both of

Ok thanks a lot to both of you :)
I assume i have to decrease connection number.

Syndicate content