server je pod Linux-om 64bit, 16G RAM-a, MySQL 5.1.
Variable u my.cnf :
key_buffer =256M
max_allowed_packet = 8M
table_cache = 256
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
event_scheduler = ON
thread_concurrency = 8
default-character-set=utf8
default-collation=utf8_general_ci
wait_timeout = 300
interactive_timeout = 300
query_cache_limit = 2M
query_cache_size = 32M
max_connections = 300
expire_logs_days = 10
max_binlog_size = 256M
binlog_format = ROW
binlog_cache_size = 32M
max_binlog_cache_size = 128M
innodb_data_home_dir = /usr/local/mysql/data/
innodb_data_file_path = ibdata1:10000M:autoextend
innodb_log_group_home_dir = /usr/local/mysql/data/
innodb_buffer_pool_size = 10G
innodb_additional_mem_pool_size = 20M
innodb_log_file_size = 64M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
Kada je došlo do određenog broja konekcija, pojavila se greška i mysqld se restartovao
[ERROR] /usr/local/mysql/bin/mysqld: Out of memory
U logu je još pisalo :
key_buffer_size=268435456
read_buffer_size=2097152
max_used_connections=253
max_threads=300
threads_connected=253
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1494000 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Gdje mi "škripi" sa memorijom?