sql plugin fails to connect

François LECOLIER lecolier at xandmail.com
Wed Mar 24 10:05:57 EST 2004


Hello,

A little Intro:
===============

I have set up successfuly a cyrus-imapd server 2.1.14 that performs
authentication through cyrus-sasl 2.1.18 and pam-mysql. 

As many persons on this list I saw that there was a memory leak in
saslauthd+pam+pam-mysql, so I modified pam-mysql a bit adding calls to free()
where only malloc() was called. 
The leak decreased (at least so it seemed to me) but remained.

So I switched to auxprop plus sql plugin by putting the following lines in
imapd.conf :

sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: sql
sasl_sql_engine: mysql
sasl_sql_user: superUser
sasl_sql_passwd: superPasswd
sasl_sql_hostnames: sqlHost:sqlPort 
sasl_sql_database: sqlBase
sasl_sql_select: select decode(password,'aSalt') from users where username = '%u'

And so far it worked.

My problem:
===========

The troubles began when I started to bench this configuration launching 
either 100 or 500 concurrent connections to the imap server peforming basic
tasks: login/logout, reading messages ...

I got an assortiment of the following messages for some *not all*
 bench loops :


sql plugin could not connect to host linux10
/var/lib/imap/user/b/bench76.seen (1 record, 1492 bytes) in 0 seconds
sql plugin could not connect to host linux10
sql plugin couldn't connect to any host
plaintext bench199 SASL(-13): user not found: checkpass failed


Needless to say ;-), I didn't see such messages when performing the same bench 
using pam-mysql. 

So it doesn't look as if mysql causes the trouble.
Anyway I played a bit with mysql configuration, increasing back_log and
thread_concurrency, before sending this email.

My question (at last).
======================

Considering that pam + mysql is able to handle 500 concurrent connections
quite nicely and that the sql plugin fails to do so, could any one suggest
me a way to solve this trouble.


Many thanks.
françois









---
Home Page: http://asg.web.cmu.edu/cyrus
Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list