Skip navigation links

MySQL Forums :: Newbie :: "Error establishing a database connection" when too busy


Advanced Search

"Error establishing a database connection" when too busy
Posted by: David Chan ()
Date: October 21, 2011 05:10PM

I'm running a wordpress site, the site is running not that stable when many people(over 300-500) read my homepage at the same time, it often showing " "Error establishing a database connection" . I wonder should I rise the max connection settings. In order to solve this problem.

p.s 4GB RAM @ 32 bit Linux environment


[mysqld]
tmpdir=/tmp
open_files_limit=33628

#skip-innodb
#innodb_file_per_table=1
#innodb_file_format=barracuda
#innodb_strict_mode=0
#innodb_fast_shutdown=0
#ignore-builtin-innodb
#plugin-load=innodb=ha_innodb_plugin.so

#ssl-cert=/var/cpanel/ssl/exim/exim.crt
#ssl-key=/var/cpanel/ssl/exim/exim.key

old_passwords=1
datadir=/var/lib/mysql
skip-locking
safe-show-database
tmp_table_size = 128M
max_heap_table_size = 128M
query_cache_limit=4M
query_cache_size=128M ## 32MB for every 1GB of RAM
query_cache_type=1
max_user_connections=25
max_connections=500
collation_server=utf8_unicode_ci
character_set_server=utf8


delayed_insert_timeout=40

interactive_timeout=10
wait_timeout=10
connect_timeout=10
thread_cache_size=128
key_buffer=64M ## 32MB for every 1GB of RAM
join_buffer=1M
max_connect_errors=20
max_allowed_packet=16M
table_cache=8196
record_buffer=1M
sort_buffer_size=2M ## 1MB for every 1GB of RAM
read_buffer_size=2M ## 1MB for every 1GB of RAM
read_rnd_buffer_size=2M ## 1MB for every 1GB of RAM
thread_concurrency=4 ## Number of CPUs x 2
myisam_sort_buffer_size=32M
server-id=1

[mysql.server]
user=mysql


[safe_mysqld]
open_files_limit=33628
err-log=/var/log/mysqld.log
pid-file=/var/lib/mysql/mysql.pid

[mysqldump]
quick
max_allowed_packet=16M

[mysql]
no-auto-rehash

Options: ReplyQuote


Subject Written By Posted
"Error establishing a database connection" when too busy David Chan 10/21/2011 05:10PM
Re: "Error establishing a database connection" when too busy Rick James 10/26/2011 08:13PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.