Hi,
There are a couple of things you can do to work around the connections
limitation. First, as Mike said, using sql_single should make a big
improvement over sql.
Next, the file /etc/my.cnf typically holds defaults for mysql. A line of
max_connections = 5000
will increase the number of connections allowed to 5000. This should be
more than enough. If you do not have a my.cnf, copy something like
/etc/my-small.cnf to /etc/my.cnf and then do the change.
After resetting this, restart mysql (I would run "/etc/rc.d/rc.mysqld
restart" as root). Now you should never run out of mysql connections.
Of course each mysqld process uses memory so this is not a cure all.
Reducing max_connections for mysql does not result in connections being
reused or anything like that. If you have an exhorbitant number of
mysql connections, the problem is elsewhere and cannot be dealt with in
/etc/my.cnf.
If you want to keep reducing the number of mysql connections, you can
reduced the number of apache children which are running (httpd.conf).
Each apache child produces a certain number of mysql connections.
Finally, you can try to reduce the number of mysql connections per
apache process. Using sql_single is the biggest gain you can make here.
In addition, you can also make usernameRO the same user as usernameRW
(with corresponding password) in webwork2/conf/database.conf. This
change typically cuts the number of mysql processes by 1/3, and should
not have a performance cost.
John
<| Post or View Comments |>
|