[Mailman-Developers] Mysql MemberAdaptor and Mailman 2.1.6

Ron Brogden slave at codegrunt.com
Fri Jan 13 17:53:12 CET 2006


On Friday 13 January 2006 05:54, Adrian Wells wrote:
> Fatal error connecting to MySQL database mailman (1040): Too many
> connections
> Exception exceptions.AttributeError: "MysqlMemberships instance has no
> attribute 'cursor'" in <bound method MysqlMemberships.__del__ of
> <Mailman.MysqlMemberships.MysqlMemberships instance at 0xb7b3884c>> ignored
>
> To resolve this problem, I restarted the MySQL server (which resides on
> the same host as the Mailman and Postfix server).  Below is a MySQL 'show
> processlist' of the processes running (?) when this error was displayed.

This is a common issue and affects any script that uses persistent connections 
to MySQL (PHP scripts for example).   What you can do is on the MySQL daemon 
side adjust the timeout for idle connections so you do not have stale 
connections sitting around indefinitely tying up resources.  

It's been a while since I have had to tweak these but I believe that the main 
one in this case is "wait_timeout" which is how long the server will wait for 
data from the client.  The default is 8 hours I think which is ridiculous.  
Try something like 120 seconds to start then move lower if you need to 
(assuming that Mailman will not take more than n seconds to send data after 
opening a connection).  You can also increase the concurrent number of 
allowed connections if you want assuming your system can handle that but from 
the looks of it, the wait timeout is probably your main foe here.

http://dev.mysql.com/doc/refman/5.0/en/show-variables.html

You will need to either set this on the command line when you start up MySQL 
or place it in the my.cnf file if you want it to stick around after a reboot. 

Cheers

-- 
CODEgrunt 
slave at codegrunt.com / http://codegrunt.com


More information about the Mailman-Developers mailing list