The mysql connection pooling module for a prefork server (like php). You can limit the number of connections by shariing connections bewteern a parent process and child processes
C
Latest commit 3df770c Jan 3, 2012 junamai2000 ワーニング対応

README

#
# how to setup
#

# load module
LoadModule namy_pool_module modules/mod_namy_pool.so
# make pooling 
# server: mysqld server name
# db: database name
# user: mysql user account
# port: mysqld port
# socket: domain socket
# option: option value for mysql_real_connect()
# connections: number of conecction to the server
# weight: weight value for load balancing
# priority: priority for fallback function
<NamyPool test>
  PoolServer "server=localhost;db=test;user=root;port=3340;socket=/var/lib/mysql/mysql.sock;option=0;connestion=5;weight=10"
  PoolServer "server=localhost;db=test;user=root;port=3340;socket=/var/lib/mysql/mysql.sock;option=0;connestion=2;weight=10"
  PoolServer "server=localhost;db=test;user=root;port=3340;socket=/var/lib/mysql/mysql.sock;option=0;connestion=5;weight=10"
</NamyPool>
<NamyPool test2>
  PoolServer "server=localhost;db=test;user=root;port=3340;socket=/var/lib/mysql/mysql.sock;option=0;connestion=3;weight=10"
  PoolServer "server=localhost;db=test;user=root;port=3340;socket=/var/lib/mysql/mysql.sock;option=0;connestion=2;weight=10"
  PoolServer "server=localhost;db=test;user=root;port=3340;socket=/var/lib/mysql/mysql.sock;option=0;connestion=5;weight=10"
</NamyPool>
# mysql_ping() interval to check connections, 5 means 5 seconds
NamyPoolPingInterval 1
# how many times you allow mysql_ping() failures before switching fallback servers
NamyPoolMaxFailure 5
# alert mail settings
NamyPoolMailFrom "test@junamai2000.co.jp"
NamyPoolMailTo "test@junamai2000.co.jp"
NamyPoolSendMail "/usr/sbin/sendmail"
# show information 
<Location /connections>
  SetHandler namy_pool
</Location>