May 29 13:34:00 de11 mysqld[18079]: 110529 13:34:00 [ERROR] /usr/sbin/mysqld: Table './monsite/sessions' is marked as crashed and should be repaired
Tout refonctionne mais pas longtemps donc pour moi il y a un problèmeRecif a dit:Voici le genre de logs dans le syslog :
Code:May 29 13:34:00 de11 mysqld[18079]: 110529 13:34:00 [ERROR] /usr/sbin/mysqld: Table './monsite/sessions' is marked as crashed and should be repaired
Sous PHPMyadmin j'ai la table marqué en "utilisé"
Je ne pense pas qu'il y ait un problème de réparation, car juste après avoir été réparée la table est ok et refonctionne...
Je pense qu'il y a un problème.Recif a dit:Donc tu penses que, même après un repair et que la table se comporte bien (jusqu'au prochain crash...) elle n'est pas efficace?...
Le graphe mémoire :Aucun problème de disque a été remonté dans les fichiers de log du serveur ce week-end.
Par contre pour la journée de Dimanche par exemple virtuozzo a remonté beaucoup de kill de processus pour dépassement de mémoire. Dans ces logs il y a par exemple mysql et apache .
Il est possible que si virtuozzo est killé mysql sur un traitement SQL , certaine table ai été corrompu
voici les log des kill de mysql pour dépassement mémoire
May 29 04:08:17 vz10 kernel: OOM killed process mysqld (pid=31139, ve=101) exited, free=271798 gen=5340.
May 29 04:24:11 vz10 kernel: OOM killed process mysqld (pid=16942, ve=101) exited, free=200048 gen=5341.
May 29 16:13:12 vz10 kernel: OOM killed process mysqld (pid=28688, ve=101) exited, free=427927 gen=5355.
May 29 17:12:42 vz10 kernel: OOM killed process mysqld (pid=2166, ve=101) exited, free=392178 gen=5356.
May 29 18:01:14 vz10 kernel: OOM killed process mysqld (pid=21435, ve=101) exited, free=339665 gen=5357.
May 29 18:32:15 vz10 kernel: OOM killed process mysqld (pid=10963, ve=101) exited, free=280987 gen=5358.
Il n'est pas normal d'avoir plus de 10 connexions pour une IP sur votre serveur. Une visite d'un site par un internaute c'est une connexion.
Sachant que depuis dimanche, où nous sommes intervenu sur votre serveur, vous avez eut à des moments plus de 100 connexions sur des IP ( dont certaines de chine )
Il faudrait regarder en fonction de la RAM dont tu disposes et de la taille de tes bases. C'est pas particulier, c'est "ajusté". Après si tu as 1Go de RAM et 50Go de data SQL, là tu auras souvent çaRecif a dit:Oui, je suis à 2 doigts de le faire aussi en ce qui conerne afrinic!
Pour ce qui est de OOM et MySQL, y a t'il une config particulière à mettre en place?
Julia41 a dit:Tu as 3480 bases et autant de sites ?
Ca commence à faire très gros pour n'importe quel serveur.
Je trouve la consommation de ton Apache plutôt importante mais bon, si tu as plus de 3000 sites et que certains sont bien visités c'est "normal".
Tu pourrais faire un strace sur l'un des process Apache pour voir ce qu'il consomme (et ainsi avoir son utilisation) mais à mon avis tu arrives au bout de ce qu'il peut tenir.
YoyoS a dit:Ton MaxClients est très faible (10)
Par contre ton MaxKeepAliveRequests est trop grand (1000)
fstat(98, {st_mode=S_IFREG|0666, st_size=2015, ...}) = 0
lseek(98, 0, SEEK_CUR) = 0
read(98, "<?php if (!defined(\'IN_PHPBB\')) "..., 8192) = 2015
read(98, "", 8192) = 0
read(98, "", 8192) = 0
close(98) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0
poll([{fd=97, events=POLLIN|POLLPRI}], 1, 0) = 0
setsockopt(97, SOL_SOCKET, SO_SNDTIMEO, "\2003\341\1\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0
write(97, "\1\0\0\0\1", 5) = 5
shutdown(97, 2 /* send and receive */) = 0
close(97) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0
writev(96, [{"HTTP/1.1 200 OK\r\nDate: Tue, 31 M"..., 276}, {"<!DOCTYPE html PUBLIC \"-//W3C//D"..., 13509}], 2) = 11680
poll([{fd=96, events=POLLOUT, revents=POLLOUT}], 1, 30000) = 1
writev(96, [{"m.\r\n\tThis not only gives respect"..., 2105}], 1) = 2105
chdir("/") = 0
umask(022) = 022
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
write(56, "109.230.251.74 - - [31/May/2011:"..., 205) = 205
times({tms_utime=415, tms_stime=42, tms_cutime=0, tms_cstime=0}) = 76815157
shutdown(96, 1 /* send */) = 0
poll([{fd=96, events=POLLIN, revents=POLLIN|POLLHUP}], 1, 2000) = 1
read(96, "", 512) = 0
close(96) = 0
read(4, 0x7fffd7005c77, 1) = -1 EAGAIN (Resource temporarily unavailable)
accept(3, {sa_family=AF_INET, sin_port=htons(42667), sin_addr=inet_addr("127.0.0.1")}, [17179869200]) = 96
getsockname(96, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("127.0.0.1")}, [17179869200]) = 0
fcntl(96, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(96, F_SETFL, O_RDWR|O_NONBLOCK) = 0
read(96, "GET / HTTP/1.0\r\nUser-Agent: Apac"..., 8000) = 66
lseek(94, 0, SEEK_SET) = 0
read(94, "\1\0\0\2\0\0\3\0\0\4\0\0j\232)k\232)\5\0\0\6\0\0G\256\10"..., 4096) = 4096
lseek(94, 4096, SEEK_SET) = 4096
lseek(94, 4096, SEEK_SET) = 4096
lseek(94, 3411968, SEEK_SET) = 3411968
read(94, "G\tXBX\255\10Y\255\10b\255\10\273iEZ\255\10[\255\10_\255"..., 4096) = 4096
lseek(94, 14946304, SEEK_SET) = 14946304
read(94, "\2&\266\2&\267\2&\256\2&/\205A\262\2&\263\2&\257\2&\260"..., 4096) = 4096
lseek(94, 15753216, SEEK_SET) = 15753216
read(94, "\311f\4qSK\2\20(\3\20(\3PK\4\20(\7\20(\3PK\3PK\5\20(\3"..., 4096) = 4096
lseek(94, 15912960, SEEK_SET) = 15912960
read(94, "\2x(\3x(\4x(\5x(\204\224J\316\0\4uvKr\1\4\204\224JP;j\6"..., 4096) = 4096
lseek(94, 16121856, SEEK_SET) = 16121856
read(94, "\232\"(\365RH\r\5\4\31!J\372\5\4\312TKWyL\365RH\6\0)\7"..., 4096) = 4096
stat("/home/www/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/.htaccess", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/.htaccess", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/www/.htaccess", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/home/www/index.html", 0x7fffd70058d0) = -1 ENOENT (No such file or directory)
lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/www", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/www/index.html", 0x7fffd70058d0) = -1 ENOENT (No such file or directory)
stat("/home/www/index.cgi", 0x7fffd70058d0) = -1 ENOENT (No such file or directory)
lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/www", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/www/index.cgi", 0x7fffd70058d0) = -1 ENOENT (No such file or directory)
stat("/home/www/index.pl", 0x7fffd70058d0) = -1 ENOENT (No such file or directory)
lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/www", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/www/index.pl", 0x7fffd70058d0) = -1 ENOENT (No such file or directory)
stat("/home/www/index.php", 0x7fffd70058d0) = -1 ENOENT (No such file or directory)
lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/www", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/www/index.php", 0x7fffd70058d0) = -1 ENOENT (No such file or directory)
stat("/home/www/index.xhtml", 0x7fffd70058d0) = -1 ENOENT (No such file or directory)
lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/www", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/www/index.xhtml", 0x7fffd70058d0) = -1 ENOENT (No such file or directory)
open("/home/www/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|0x80000) = 97
fstat(97, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/home/www/HEADER.html", 0x7fffd7003610) = -1 ENOENT (No such file or directory)
lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/www", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/www/HEADER.html", 0x7fffd7003610) = -1 ENOENT (No such file or directory)
getdents(97, /* 2 entries */, 4096) = 48
lstat("/home/www/.", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/www/..", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents(97, /* 0 entries */, 4096) = 0
close(97) = 0
stat("/home/www/README.html", 0x7fffd70035e0) = -1 ENOENT (No such file or directory)
lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/www", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/www/README.html", 0x7fffd70035e0) = -1 ENOENT (No such file or directory)
writev(96, [{"HTTP/1.1 200 OK\r\nDate: Tue, 31 M"..., 190}, {"<!DOCTYPE HTML PUBLIC \"-//W3C//D"..., 455}], 2) = 645
times({tms_utime=416, tms_stime=42, tms_cutime=0, tms_cstime=0}) = 76815538
shutdown(96, 1 /* send */) = -1 ENOTCONN (Transport endpoint is not connected)
close(96) = 0
read(4, "!", 1) = 1
close(95) = 0
close(94) = 0
munmap(0x2ae4c5e39000, 4096) = 0
close(5) = 0
close(4) = 0
exit_group(0) = ?
Process 5620 detached
MaxClients tu peux le monterRecif a dit:YoyoS a dit:Ton MaxClients est très faible (10)
Par contre ton MaxKeepAliveRequests est trop grand (1000)
Quelles seraient les valeurs correctes?...
Si ton /home/www/ n'existe pas, pourquoi tu as :
DocumentRoot "/home/www"
Dans ton apache.conf ?
Tu peux faire un ptit scriptRecif a dit:2 petites questions à propos de ça d'ailleurs:
- Y a t-il un moyen plus rapide que de faire des "iptables -A INPUT -s 217.199.224.0/20 -j DROP"?
#!/bin/bash
iptables -A INPUT -s $1 -j DROP
<IfModule mod_evasive20.c>
DOSHashTableSize 3097
DOSPageCount 3
DOSSiteCount 50
DOSPageInterval 2
DOSSiteInterval 2
DOSBlockingPeriod 300
DOSEmailNotify "admin@majorxtrem.be"
DOSLogDir "/var/log/mod_evasive/"
#DOSSystemCommand "/sbin/iptables -I INPUT -s %s -j DROP"
DOSSystemCommand "/bin/echo %s >> /var/log/mod_evasive/dos_evasive.log && /bin/date >> /var/log/mod_evasive/dos_evasive.log"
DOSWhiteList 127.0.0.1
DOSWhitelist 66.249.65.*
DOSWhitelist 66.249.66.*
DOSWhitelist 66.249.67.*
</IfModule>
Le load n'indique pas que le processeur, c'est "l'ensemble" du serveur (et c'est pour ça que linux rocks).Recif a dit:C'est un bi xeon quadcore... C'est bizarre parce que lorsqu'il est à 20 je ne note aucun ralentissement sur les sites...