2013-05-02

Salut à tous,

Mon serveur MySQL vient (encore) de down, et je viens vers vous pour savoir si la configuration que je viens d'adopter (baisse du table_cache de 100 000 à 50 000) arrangera çela ou non.

Voici le rapport de Syslog :

Code :
---------
root@ xxxxxx:/var/www# cat /var/log/syslog | grep mysql
May 2 07:00:01 xxxxxx CRON[25772]: (root) CMD (sh /etc/cron/mysql.sh)
May 2 08:00:01 xxxxxx CRON[6833]: (root) CMD (sh /etc/cron/mysql.sh)
May 2 09:00:01 xxxxxx CRON[20658]: (root) CMD (sh /etc/cron/mysql.sh)
May 2 10:00:01 xxxxxx CRON[3047]: (root) CMD (sh /etc/cron/mysql.sh)
May 2 11:00:01 xxxxxx CRON[18169]: (root) CMD (sh /etc/cron/mysql.sh)
May 2 12:00:01 xxxxxx CRON[611]: (root) CMD (sh /etc/cron/mysql.sh)
May 2 13:00:01 xxxxxx CRON[15100]: (root) CMD (sh /etc/cron/mysql.sh)
May 2 14:00:01 xxxxxx CRON[30375]: (root) CMD (sh /etc/cron/mysql.sh)
May 2 15:00:01 xxxxxx CRON[13963]: (root) CMD (sh /etc/cron/mysql.sh)
May 2 16:00:01 xxxxxx CRON[29324]: (root) CMD (sh /etc/cron/mysql.sh)
May 2 17:00:01 xxxxxx CRON[12097]: (root) CMD (sh /etc/cron/mysql.sh)
May 2 18:00:01 xxxxxx CRON[27914]: (root) CMD (sh /etc/cron/mysql.sh)
May 2 19:00:01 xxxxxx CRON[11417]: (root) CMD (sh /etc/cron/mysql.sh)
May 2 20:00:01 xxxxxx CRON[27186]: (root) CMD (sh /etc/cron/mysql.sh)
May 2 21:00:01 xxxxxx CRON[10692]: (root) CMD (sh /etc/cron/mysql.sh)
May 2 21:03:51 xxxxxx kernel: Out of memory: Kill process 9303 (mysqld) score 50 or sacrifice child
May 2 21:03:51 xxxxxx kernel: Killed process 9303 (mysqld) total-vm:1788352kB, anon-rss:1252972kB, file-rss:0kB
May 2 21:03:51 xxxxxx kernel: [23276] 104 9303 447088 316168 5 0 0 mysqld
May 2 21:03:51 xxxxxx kernel: Out of memory: Kill process 23276 (mysqld) score 51 or sacrifice child
May 2 21:03:51 xxxxxx kernel: Killed process 23276 (mysqld) total-vm:1788352kB, anon-rss:1263760kB, file-rss:912kB
May 2 21:03:52 xxxxxx init: mysql main process (9303) killed by KILL signal
May 2 21:03:52 xxxxxx init: mysql main process ended, respawning
May 2 21:04:27 xxxxxx init: mysql post-start process (13335) terminated with status 1
May 2 21:16:03 xxxxxx /etc/mysql/debian-start[16341]: Upgrading MySQL tables if necessary.
May 2 21:16:03 xxxxxx /etc/mysql/debian-start[16344]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
May 2 21:16:03 xxxxxx /etc/mysql/debian-start[16344]: Looking for 'mysql' as: /usr/bin/mysql
May 2 21:16:03 xxxxxx /etc/mysql/debian-start[16344]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
May 2 21:16:03 xxxxxx /etc/mysql/debian-start[16344]: This installation of MySQL is already upgraded to 5.1.67, use --force if you still need to run mysql_upgrade
May 2 21:16:03 xxxxxx /etc/mysql/debian-start[16352]: Checking for insecure root accounts.
May 2 21:16:03 xxxxxx /etc/mysql/debian-start[16357]: Triggering myisam-recover for all MyISAM tables
---------
Et voici la config MySQL :

Code :
---------
cat my.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0

[mysqld]
#
# * Basic Settings
#

#
# * IMPORTANT
# If you make changes to these settings and your system uses apparmor, you may
# also need to also adjust /etc/apparmor.d/usr.sbin.mysqld.
#

user = mysql
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
read_buffer_size = 8M

# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched

myisam-recover = BACKUP
innodb_buffer_pool_size = 999M
max_connections = 2500
table_cache = 50000
max_connect_errors = 9999999999
connect_timeout = 30
tmp_table_size = 16M
wait_timeout = 3000
interactive_timeout = 3000

#
# * Query Cache Configuration
#

query_cache_limit = 8M
query_cache_size = 8M

#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1

log_error = /var/log/mysql/error.log

# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql-slow.log
#long_query_time = 1
log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 5
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem

[mysqldump]
quick
quote-names
max_allowed_packet = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer = 16M

#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
---------
Si pas de beug d'ici 2 jours, je posterai un tuning-primer + mysqltuner ...

Voilà, merci d'éclairer ma lanterne ...

Upee

Show more