Ubuntu 8.04 ZM 1.24.1 mysql_pconnect error
Posted: Wed Mar 25, 2009 6:12 pm
I fixed a problem today that I was unable to find any posts about so I thought I would document what it was.
I have an Ubuntu 8.04 AMD64 server setup with ffmpeg 0.5 and ZM 1.24.1. I have a total of 32 monitors configured. One client was able to view montage but as soon as second client tried I started getting php errors.
I no longer have the exact error in front of me, but it had mysql_pconnect "too many connections" and database.php in it. After a little digging I found a php setting to limit the number of mysql connections. On Ubuntu 8.04 it is set to -1 (unlimited).
After more Googling I found that MySQL also has a client limit. There was no setting for it, but I added a line to the [mysqld] section of /etc/mysql/my.cnf
You can also view the current (maybe default) setting from within mysql with this command:
I still have a couple more issues to fix (one show stopper), but ZM 1.24.1 seems to be an improvement from 1.23.
Cheers,
the_crowbar
I have an Ubuntu 8.04 AMD64 server setup with ffmpeg 0.5 and ZM 1.24.1. I have a total of 32 monitors configured. One client was able to view montage but as soon as second client tried I started getting php errors.
I no longer have the exact error in front of me, but it had mysql_pconnect "too many connections" and database.php in it. After a little digging I found a php setting to limit the number of mysql connections. On Ubuntu 8.04 it is set to -1 (unlimited).
After more Googling I found that MySQL also has a client limit. There was no setting for it, but I added a line to the [mysqld] section of /etc/mysql/my.cnf
Code: Select all
# Increase the maximum number of connections
max_connections = 500
Code: Select all
mysql> show variables like 'max_connections';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 500 |
+-----------------+-------+
1 row in set (0.00 sec)
Cheers,
the_crowbar