vespa Posté 20 Mars 2006 Posté 20 Mars 2006 Bonjour, J'ai régulièrement le serveur mysql qui plante suite je pense à un fort trafic... Je ne sais pas du tout par ou commencer mes investigations... Si quelqu'un peut m'éclairer
vespa Posté 20 Mars 2006 Auteur Posté 20 Mars 2006 last pid: 26108; load averages: 33.20, 30.69, 30.00 up 0+15:38:07 13:55:35222 processes: 9 running, 212 sleeping, 1 zombieCPU states: 51.6% user, 0.0% nice, 48.0% system, 0.4% interrupt, 0.0% idleMem: 1149M Active, 163M Inact, 267M Wired, 44M Cache, 214M Buf, 272M FreeSwap: 4096M Total, 94M Used, 4002M Free, 2% Inuse PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND25950 mysql 20 0 84260K 56404K kserel 2:15 15.58% 15.58% mysqld26031 www 105 0 98188K 22676K RUN 0:02 1.61% 1.61% httpd26032 www 4 0 91996K 16604K accept 0:01 1.56% 1.56% httpd 592 www 4 0 94080K 17616K accept 9:03 0.93% 0.93% httpd25574 www 4 0 92064K 16288K sbwait 0:05 0.83% 0.83% httpd 591 www 4 0 94000K 17500K sbwait 9:56 0.73% 0.73% httpd26051 www 4 0 86320K 10816K sbwait 0:01 0.64% 0.63% httpd23787 www 4 0 92736K 16064K sbwait 0:13 0.59% 0.59% httpd26027 www 4 0 92432K 16848K sbwait 0:02 0.59% 0.59% httpd22321 www 4 0 91752K 15688K sbwait 0:52 0.54% 0.54% httpd 609 www 4 0 97400K 17464K sbwait 9:34 0.44% 0.44% httpd26023 www 4 0 91796K 15236K sbwait 0:01 0.44% 0.44% httpd 613 www 4 0 93768K 17260K accept 10:26 0.34% 0.34% httpd26020 www 4 0 93176K 17788K sbwait 0:01 0.34% 0.34% httpd26047 www 4 0 91760K 16288K accept 0:01 0.34% 0.34% httpd23041 www 4 0 91996K 16276K sbwait 0:31 0.29% 0.29% httpd23589 www 4 0 92092K 16064K sbwait 0:18 0.24% 0.24% httpd
Dan Posté 20 Mars 2006 Posté 20 Mars 2006 Salut, Qu'as-tu mis dans le fichier de config mysql ? Et quelle version utilises-tu ? Dan
vespa Posté 20 Mars 2006 Auteur Posté 20 Mars 2006 Salut Dan Je vais peut être dire une bétise mais je ne crois pas avoir de fichier de configuration my.ini La version que j'utilise est sous FreeBSD mysql-server-4.0.24... Peut être faut il que je mette un fichier my.ini mais je ne sais pas ou le mettre et quoi mettre dedans
dièse Posté 21 Mars 2006 Posté 21 Mars 2006 Bonjour, Regarde si tu n'as pas un fichier my.cnf dans le répertoire /etc/.
vespa Posté 21 Mars 2006 Auteur Posté 21 Mars 2006 Non je n'en ai pas, j'ai vérifié, et j'ai lu qu'il n'est pas installé par défaut sous freebsd qui utilise une config standard... Peut être faut il que j'en mette un mais je ne sais pas quoi mettre dans ce fichier
vespa Posté 21 Mars 2006 Auteur Posté 21 Mars 2006 Finalement je l'ai trouvé et je l'ai copié dans /etc/ et relancé mysql mais cela rame toujours autant # Example MySQL config file for large systems.## This is for a large system with memory = 512M where the system runs mainly# MySQL.## You can copy this file to# /etc/my.cnf to set global options,# mysql-data-dir/my.cnf to set server-specific options (in this# installation this directory is /var/db/mysql) or# ~/.my.cnf to set user-specific options.## In this file, you can use all long options that a program supports.# If you want to know which options a program supports, run the program# with the "--help" option.# The following options will be passed to all MySQL clients[client]#password = your_passwordport = 3306socket = /tmp/mysql.sock# Here follows entries for some specific programs# The MySQL server[mysqld]port = 3306socket = /tmp/mysql.sockskip-lockingkey_buffer = 512Mmax_allowed_packet = 5Mtable_cache = 512sort_buffer_size = 5Mread_buffer_size = 5Mmyisam_sort_buffer_size = 128Mthread_cache = 16query_cache_size= 16M# Try number of CPU's*2 for thread_concurrencythread_concurrency = 16# Don't listen on a TCP/IP port at all. This can be a security enhancement,# if all processes that need to connect to mysqld run on the same host.# All interaction with mysqld must be made via Unix sockets or named pipes.# Note that using this option without enabling named pipes on Windows# (via the "enable-named-pipe" option) will render mysqld useless!# #skip-networking# Replication Master Server (default)# binary logging is required for replicationlog-bin# required unique id between 1 and 2^32 - 1# defaults to 1 if master-host is not set# but will not function as a master if omittedserver-id = 1# Replication Slave (comment out master section to use this)## To configure this host as a replication slave, you can choose between# two methods :## 1) Use the CHANGE MASTER TO command (fully described in our manual) -# the syntax is:## CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;## where you replace <host>, <user>, <password> by quoted strings and# <port> by the master's port number (3306 by default).## Example:## CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,# MASTER_USER='joe', MASTER_PASSWORD='secret';## OR## 2) Set the variables below. However, in case you choose this method, then# start replication for the first time (even unsuccessfully, for example# if you mistyped the password in master-password and the slave fails to# connect), the slave will create a master.info file, and any later# change in this file to the variables' values below will be ignored and# overridden by the content of the master.info file, unless you shutdown# the slave server, delete master.info and restart the slaver server.# For that reason, you may want to leave the lines below untouched# (commented) and instead use CHANGE MASTER TO (see above)## required unique id between 2 and 2^32 - 1# (and different from the master)# defaults to 2 if master-host is set# but will not function as a slave if omitted#server-id = 2## The replication master for this slave - required#master-host = <hostname>## The username the slave will use for authentication when connecting# to the master - required#master-user = <username>## The password the slave will authenticate with when connecting to# the master - required#master-password = <password>## The port the master is listening on.# optional - defaults to 3306#master-port = <port>## binary logging - not required for slaves, but recommended#log-bin# Point the following paths to different dedicated disks#tmpdir = /tmp/ #log-update = /path-to-dedicated-directory/hostname# Uncomment the following if you are using BDB tables#bdb_cache_size = 64M#bdb_max_lock = 100000# Uncomment the following if you are using InnoDB tables#innodb_data_home_dir = /var/db/mysql/#innodb_data_file_path = ibdata1:10M:autoextend#innodb_log_group_home_dir = /var/db/mysql/#innodb_log_arch_dir = /var/db/mysql/# You can set .._buffer_pool_size up to 50 - 80 %# of RAM but beware of setting memory usage too high#innodb_buffer_pool_size = 256M#innodb_additional_mem_pool_size = 20M# Set .._log_file_size to 25 % of buffer pool size#innodb_log_file_size = 64M#innodb_log_buffer_size = 8M#innodb_flush_log_at_trx_commit = 1#innodb_lock_wait_timeout = 50[mysqldump]quickmax_allowed_packet = 16M[mysql]no-auto-rehash# Remove the next comment character if you are not familiar with SQL#safe-updates[isamchk]key_buffer = 128Msort_buffer_size = 128Mread_buffer = 2Mwrite_buffer = 2M[myisamchk]key_buffer = 128Msort_buffer_size = 128Mread_buffer = 2Mwrite_buffer = 2M[mysqlhotcopy]interactive-timeout Pour info c'est un amd64 avec 2Go de Ram Si vous pouvez me donner les meilleurs valeurs à mettre dans ce fichier my.cnf Merci d'avance
Sujets conseillés
Veuillez vous connecter pour commenter
Vous pourrez laisser un commentaire après vous êtes connecté.
Connectez-vous maintenant