Piotr Wadas wrote:
> 
> Paul J Stevens wrote:
>> We're using a single, global database connection pool. Since dbmail
>>
> 
> And how exactly database connection pool works ? How open connections
> are reused between threads? My guess - there's a connection pool, which
> allocate 
> _int_max_db_connections_  of available connections.

Not quite. max_db_connections is the maximum number of connections
maintained by a single connection pool, a number much larger than the
number of connections created initially on startup.

> What I want to know is 
> how connections are reused by different threads? Let's say pop3 daemon has
> for the 
> moment 100 open pop3 sessions. When pop3 client issue a command, the daemon 
> uses db connection, and the command is completed with some internally
> processed 
> query result. Now, if in the meantime another thread (pop3 client), issue 
> another command, the command (thread) uses first free connection, or if all
> possible
> connections are doing something, the command is delayed (actually for
> miliseconds) until there's a connection available to be used with command
> - is it this, how it works ?

This is all handled by libzdb. The number of connections will scale as
required by the query load generated by dbmail.

I've tested with 100-200 concurrent very active imap clients using
imaptest, and the number of database connections fluctuated between 5
and 10.

-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

Reply via email to