Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 29/04/2007, à 12:40

vivienfr

Apache 2.2 => /etc/init.d/apache2 reload gére 50 processus apache

J'ai migré un serveur qui héberge des pages PHP/MySQL d'Ubuntu server 6.06 à 7.04.

Je passe par conséquent d'Apache 2.0.x à Apache 2.2.x

J'avais pris pour l'habitude en cas de changement de configuration de faire /etc/init.d/apache2 reload (et non pas apache2 restart qui provoque une petite indisponibilité)

Avec apache 2.2 , cette opération affiche :

* Reloading web server config...                                                             
23444
                                                                                                                                                      [ OK ]

C'est nouveau, on a le pid du process root d'apache2

suite à cette manipulation, apache va se démultiplier et passer de 5 processus à plus de 50 ! qui se terminent en <defunct> (zombie) dans le top on voit de l'apache partout !

23444 root      15   0 25412 8436 5168 S  0.0  1.6   0:00.53 apache2                                                                                         
26485 www-data  16   0 27900 8824 3352 S  0.0  1.7   0:00.26 apache2                                                                                         
26786 www-data  17   0 27884 8800 3296 S  0.0  1.7   0:00.26 apache2                                                                                         
26787 www-data  17   0 27884 8820 3316 S  0.0  1.7   0:00.25 apache2                                                                                         
26788 www-data  17   0 27884 8800 3296 S  0.0  1.7   0:00.26 apache2                                                                                         
26789 www-data  16   0 27884 8820 3316 S  0.0  1.7   0:00.26 apache2                                                                                         
26790 www-data  17   0 27884 8800 3296 S  0.0  1.7   0:00.27 apache2                                                                                         
26791 www-data  18   0 27940 9344 3716 S  0.0  1.8   0:00.85 apache2                                                                                         
26792 www-data  17   0 27940 9348 3668 S  0.0  1.8   0:01.43 apache2                                                                                         
26793 www-data  17   0  1712  484  416 S  0.0  0.1   0:00.01 sh                                                                                              
26794 www-data  20   0 29668 1332 1052 R  0.0  0.3   0:00.02 host                                                                                            
26795 www-data  17   0 27884 8800 3296 S  0.0  1.7   0:00.26 apache2                                                                                         
26796 www-data  17   0  1716  484  416 S  0.0  0.1   0:00.01 sh                                                                                              
26797 www-data  19   0 29828 1676 1260 S  0.0  0.3   0:00.01 host                                                                                            
26799 www-data  17   0  1712  480  416 S  0.0  0.1   0:00.01 sh                                                                                              
26800 www-data  17   0  1712  480  416 S  0.0  0.1   0:00.01 sh                                                                                              
26801 www-data  19   0 29832 1684 1260 S  0.0  0.3   0:00.02 host                                                                                            
26803 www-data  20   0 29828 1676 1260 S  0.0  0.3   0:00.02 host                                                                                            
26805 www-data  17   0  1716  488  416 S  0.0  0.1   0:00.01 sh                                                                                              
26806 www-data  20   0 29664 1268  992 R  0.0  0.2   0:00.02 host                                                                                            
26807 www-data  17   0 27884 8800 3296 S  0.0  1.7   0:00.26 apache2                                                                                         
26809 www-data  17   0  1712  484  416 S  0.0  0.1   0:00.01 sh                                                                                              
26810 www-data  19   0 29832 1680 1260 S  0.0  0.3   0:00.01 host                                                                                            
26812 www-data  18   0  1716  488  416 S  0.0  0.1   0:00.01 sh                                                                                              
26813 www-data  20   0 29828 1676 1260 S  0.0  0.3   0:00.02 host                                                                                            
26815 www-data  16   0  1716  488  416 S  0.0  0.1   0:00.01 sh                                                                                              
26816 www-data  19   0 29832 1680 1260 S  0.0  0.3   0:00.02 host                                                                                            
26818 www-data  18   0 27940 9344 3716 S  0.0  1.8   0:00.83 apache2                                                                                         
26822 www-data  17   0 27884 8820 3316 S  0.0  1.7   0:00.26 apache2                                                                                         
26824 www-data  17   0  1712  484  416 S  0.0  0.1   0:00.01 sh                                                                                              
26825 www-data  19   0 29660 1388 1112 S  0.0  0.3   0:00.01 host                                                                                            
26826 www-data  18   0  1716  484  416 S  0.0  0.1   0:00.00 sh                                                                                              
26827 www-data  16   0  1716  484  416 S  0.0  0.1   0:00.01 sh                                                                                              
26828 www-data  19   0 29660 1388 1112 S  0.0  0.3   0:00.02 host                                                                                            
26831 www-data  20   0 29660 1388 1112 S  0.0  0.3   0:00.01 host                                                                                            
26860 www-data  17   0 27884 8800 3296 S  0.0  1.7   0:00.26 apache2                                                                                         
26862 www-data  17   0  1716  484  416 S  0.0  0.1   0:00.01 sh                                                                                              
26863 www-data  19   0  4972  384  264 R  0.0  0.1   0:00.01 host                                                                                            
26864 www-data  19   0  1716  488  416 R  0.0  0.1   0:00.01 sh                                                                                              
26865 www-data  19   0  1716   72    0 R  0.0  0.0   0:00.00 sh

Le load average explose à 30 (contre 0.1 max normalement)
Dans l'exemple ci-dessus ils ne consomment pas de cpu mais en général ils bouffent tous ce qu'ils peuvent en CPU...
Une minute après le reload tout est ok.

Si je recommence le reload => on est reparti pour un tour.

Par contre un restart ou un force-reload ne pose pas ce problème mais le servuer est arrêté un cour instant.

De même si aprés un restart je fais un reload, celui ci ne généreras pas des dizaines de processus. Il faut qu'apache ait bien servi avant le reload pour avoir ce comportement qui n'existait pas avec apache 2.0.x

Une idée ?
Vous avez ce problème ?


fr.archive.ubuntu.com : Statistiques sur les versions d'Ubuntu en France

Hors ligne