httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MD Raziuddin Haqqani" <haq...@sahara.com.sa>
Subject Re: [users@httpd] "Too many connections" error fix?
Date Thu, 02 Oct 2003 06:12:07 GMT
I to got the same problem but I change my my.cnf to something like this:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
set-variable = max_connections=900
set-variable = wait_timeout=1200

[mysql.server]
user=mysql
basedir=/var/lib
set-variable    = max_connection=100000
set-variable    = table_cache=10000
set-variable    = wait_timeout=900

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Hope this will help you
----- Original Message ----- 
From: "Nathan Ollerenshaw" <nathan@valuecommerce.ne.jp>
To: <users@httpd.apache.org>
Sent: Thursday, October 02, 2003 9:06 AM
Subject: Re: [users@httpd] "Too many connections" error fix?


> On Oct 2, 2003, at 2:49 PM, URLTrak Support wrote:
>
> > I last increased my max connections to 500. That seemed to fix things
> > for a
> > while. Now I am getting the problems (database freezing up because too
> > many
> > connections) again. The site I run is pretty high traffic.
>
> Look at your MySQL DB.
>
> You sound like your running vBulletin or phpNuke or something like that.
>
> If you're using a standard install, your MySQL tables will all be using
> MyISAM table format, which only supports table-level locking.
>
> do a mysqladmin processlist (you might need to authenticate with that
> command depending on your setup). This will show you the state of all
> the connections currently to your MySQL database.
>
> If you see a lot of SELECT all taking a long time to complete, you will
> probably find that any INSERT or UPDATEs going on are locking the whole
> table and stopping the SELECTs from completing (I'm sure there is a
> better explanation but I'm not a real DBA).
>
> The fix is to convert all your tables to INNODB, which does row-level
> locking and allows a select to happen at the same time as an insert or
> update.
>
> One DB I manage, I set up the my.cnf like so:
>
> # Uncomment the following if you are using Innobase tables
> innodb_data_file_path = ibdata1:1000M
> innodb_data_home_dir = /usr/local/mysql-max/data/innodb
> innodb_log_group_home_dir = /usr/local/mysql-max/data/innodb/log
> innodb_log_arch_dir = /usr/local/mysql-max/data/innodb/log
> set-variable = innodb_mirrored_log_groups=1
> set-variable = innodb_log_files_in_group=3
> set-variable = innodb_log_file_size=5M
> set-variable = innodb_log_buffer_size=8M
> innodb_flush_log_at_trx_commit=1
> innodb_log_archive=0
> set-variable = innodb_buffer_pool_size=16M
> set-variable = innodb_additional_mem_pool_size=2M
> set-variable = innodb_file_io_threads=4
> set-variable = innodb_lock_wait_timeout=50
>
> paths obviously need to match your configuration. Note that the
> innodb_data_file_path will create a file of 1GB when you restart mysql!
> You can make it smaller, if you want.
>
> Check out the InnoDB documentation for MySQL:
> http://mysql.us.themoes.org/doc/en/InnoDB.html
>
> Then, I converted all my tables one by one with:
>
> ALTER TABLE table_name TYPE=INNODB;
>
> at the mysql command line. This is generally safe to run on a live
> system. I ran it on a large vBulletin site and nobody noticed anything
> but a slight sluggishness.
>
> Hope this helps.
>
> Regards,
>
> Nathan.
>
> -- 
> Nathan Ollerenshaw - Unix Systems Engineer
> ValueCommerce - http://www.valuecommerce.ne.jp/
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message