Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2675 connectés 

  FORUM HardWare.fr
  Systèmes & Réseaux Pro
  Réseaux

  Apache 2 : Saturation jusqu'à MaxClients et blocage ?

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Apache 2 : Saturation jusqu'à MaxClients et blocage ?

n°83653
<< Jeje >>
Posté le 05-08-2011 à 09:19:13  profilanswer
 

Hello,
 
J'ai un serveur Dédibox hébergeant plusieurs sites en http et https, une fois de temps à autre (entre 2 fois/semaine et 1fois toutes les 3 semaine) apache2 atteint MaxClients (100) et ne sert plus de page.
 
Dans un premier temps j'ai programmé un redémarrage journalier mais cela ne change rien.  
 
Avec Munin sur le graph Netstat je me suis rendu compte qu'au moment du blocage j'avais un pic de connexions établies mais est-ce la cause ou la conséquence du blocage ?
 
Avec netstat je constate quand apache est bloqué qu'il y a beaucoup de SYN_RECV.
 
Quand je redémarre apache tout rentre dans l'ordre imédiatement.
 
J'ai tenté une attaque avec hping3 et LOIC (depuis 1 seul PC) : le serveur ralenti mais ne se bloque pas et reprend un fonctionnement normal dès l'arrêt de ces attaques.
 
Dans les logs je ne vois rien d'anormal avant MaxClients par contre quand je relance j'ai :

[Wed Aug 03 21:38:37 2011] [warn] child process 8531 still did not exit, sending a SIGTERM
[Wed Aug 03 21:38:37 2011] [warn] child process 25710 still did not exit, sending a SIGTERM
[Wed Aug 03 21:38:37 2011] [warn] child process 26000 still did not exit, sending a SIGTERM
[Wed Aug 03 21:38:39 2011] [error] child process 8531 still did not exit, sending a SIGKILL
[Wed Aug 03 21:38:39 2011] [error] child process 25710 still did not exit, sending a SIGKILL
[Wed Aug 03 21:38:39 2011] [error] child process 26000 still did not exit, sending a SIGKILL
[Wed Aug 03 21:38:40 2011] [notice] caught SIGTERM, shutting down
[Wed Aug 03 21:38:41 2011] [notice] Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations


 
Auriez-vous quelques pistes/idées d'investigation de mon problème ?
 
Version Apache :

Server version: Apache/2.2.9 (Debian)
Server built:   Dec 11 2010 18:58:55
Server's Module Magic Number: 20051116:16
Server loaded:  APR 1.2.12, APR-Util 1.2.12
Compiled using: APR 1.2.12, APR-Util 1.2.12
Architecture:   32-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT=""
 -D SUEXEC_BIN="/usr/lib/apache2/suexec"
 -D DEFAULT_PIDLOG="/var/run/apache2.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
 -D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"


 
apache2.conf :

ServerRoot "/etc/apache2"
LockFile /var/lock/apache2/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 30
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
ServerLimit 100
# Mod utilise
<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients           100
    ServerLimit          100
    MaxRequestsPerChild  500
</IfModule>
<IfModule mpm_worker_module>
    StartServers          2
    MaxClients          100
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadsPerChild      25
    MaxRequestsPerChild  500
</IfModule>
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
AccessFileName .htaccess
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>
DefaultType text/plain
HostnameLookups Off
ErrorLog /var/log/apache2/error.log
LogLevel warn
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/apache2/httpd.conf
Include /etc/apache2/ports.conf
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined
Include /etc/apache2/conf.d/
Include /etc/apache2/sites-enabled/

mood
Publicité
Posté le 05-08-2011 à 09:19:13  profilanswer
 

n°83816
pervmaster
Posté le 12-08-2011 à 12:51:37  profilanswer
 

Augmente le max clients ?  
Regarde quel site web maintient des sessions ouvertes dans le vent.

n°83818
<< Jeje >>
Posté le 12-08-2011 à 13:52:44  profilanswer
 

pervmaster a écrit :

Augmente le max clients ?


Je ne peut pas je suis limite coté ressources.
 

pervmaster a écrit :

Regarde quel site web maintient des sessions ouvertes dans le vent.


Comment peut-on voir cette info ?
 
Pour le moment j'ai installé mo_security2 et mod_evasive, cela ne peut pas faire de mal je pense.


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Systèmes & Réseaux Pro
  Réseaux

  Apache 2 : Saturation jusqu'à MaxClients et blocage ?

 

Sujets relatifs
Hotspot problème de connexionutilisation de mon proxy apache?
APACHE : access.log et error.log saturé par webdav[Win2008R2] Blocage temporaire à l'ouverture/fermeture session TSE
APACHE et oraclesaturation bp subnet datacenter
LAN - Saturation BPServeur 2003 avec deux cartes réseau avec serveur apache
Reverse Proxy avec Apache 2.2 
Plus de sujets relatifs à : Apache 2 : Saturation jusqu'à MaxClients et blocage ?


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR