Author Topic: Erreurs Apache et System  (Read 1819 times)

Offline Spinacle

  • Revendeurs
  • Hero Member
  • ******
  • Posts: 993
  • Karma: 28
    • View Profile
    • Aubergedunet
Erreurs Apache et System
« on: Octobre 24, 2006, 07:19:56 pm »
Bonsoir,

Je constate les erreurs suivantes sur mon VPS au niveau d'Apache.
Code: [Select]
[Tue Oct 24 15:43:24 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
FATAL:  emalloc():  Unable to allocate 24 bytes
FATAL:  emalloc():  Unable to allocate 51 bytes
FATAL:  emalloc():  Unable to allocate 84 bytes
FATAL:  erealloc():  Unable to allocate 245760 bytes
FATAL:  erealloc():  Unable to allocate 252381 bytes
FATAL:  erealloc():  Unable to allocate 954386 bytes
FATAL:  emalloc():  Unable to allocate 2132424 bytes
FATAL:  emalloc():  Unable to allocate 4264847 bytes
FATAL:  emalloc():  Unable to allocate 70079 bytes
FATAL:  erealloc():  Unable to allocate 3932160 bytes
FATAL:  emalloc():  Unable to allocate 2103007 bytes
[Tue Oct 24 16:50:26 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Tue Oct 24 16:50:37 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Tue Oct 24 16:51:17 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
Out of memory (Needed 16384 bytes)
FATAL:  emalloc():  Unable to allocate 52 bytes
FATAL:  emalloc():  Unable to allocate 40961 bytes
FATAL:  emalloc():  Unable to allocate 46 bytes

Je penches pour un manque de RAM disponible, cela s'est produit quand j'étais sous Roundcube.

Votre avis ?


En dans le system log, j'ai cela également :

Code: [Select]
Oct 24 19:26:06 auberge proftpd: PAM unable to dlopen(/lib/security/pam_listfile.so)
Oct 24 19:26:06 auberge proftpd: PAM [dlerror: /lib/security/pam_listfile.so: failed to map segment from shared object: Cannot allocate memory]
Oct 24 19:26:06 auberge proftpd: PAM adding faulty module: /lib/security/pam_listfile.so
Oct 24 19:26:06 auberge proftpd: PAM unable to dlopen(/lib/security/pam_pwdb.so)
Oct 24 19:26:06 auberge proftpd: PAM [dlerror: /lib/security/pam_pwdb.so: failed to map segment from shared object: Cannot allocate memory]
Oct 24 19:26:06 auberge proftpd: PAM adding faulty module: /lib/security/pam_pwdb.so
Oct 24 19:26:06 auberge proftpd: PAM unable to dlopen(/lib/security/pam_deny.so)
Oct 24 19:26:06 auberge proftpd: PAM [dlerror: /lib/security/pam_deny.so: failed to map segment from shared object: Cannot allocate memory]
Oct 24 19:26:06 auberge proftpd: PAM adding faulty module: /lib/security/pam_deny.so

Là aussi, votre avis ?

Offline staff

  • Tech. EdelweissHosting
  • Administrator
  • Hero Member
  • *****
  • Posts: 6048
  • Karma: 50
    • View Profile
    • EdelweissHosting
Re : Erreurs Apache et System
« Reply #1 on: Octobre 24, 2006, 08:30:34 pm »
Bonsoir

C'est typiquement un problème de RAM ça.

Ca se produit souvent ?
Membre Staff EdelweissHosting
Site Principal: http://edelweisshosting.com
Votre IP: http://edelweisshosting.com/ip.php

Offline Spinacle

  • Revendeurs
  • Hero Member
  • ******
  • Posts: 993
  • Karma: 28
    • View Profile
    • Aubergedunet
Re : Erreurs Apache et System
« Reply #2 on: Octobre 25, 2006, 08:17:04 pm »
Je ne sais pas, je suis tombé dessus en voulant utilisé Roundcube et après avoir regardé les logs.

Quelle est la solution ?

Offline Spinacle

  • Revendeurs
  • Hero Member
  • ******
  • Posts: 993
  • Karma: 28
    • View Profile
    • Aubergedunet
Re : Erreurs Apache et System
« Reply #3 on: Octobre 25, 2006, 09:06:44 pm »
Là où je suis étonné, c'est que j'ai peu de mémoire libre si j'exclus le swap.

Total Memory   4026656 kB
Free Memory   75548 kB
Total Swap Memory   2096472 kB
Free Swap Memory   2095880 kB


Offline Spinacle

  • Revendeurs
  • Hero Member
  • ******
  • Posts: 993
  • Karma: 28
    • View Profile
    • Aubergedunet
Re : Erreurs Apache et System
« Reply #4 on: Octobre 25, 2006, 09:15:33 pm »
Je suis sur mon Direct Admin, et voici quelques extraits de certains de mes logs

DA error.log
Quote
2006:10:25-20:06:51: FORK ERROR - bad ?? Rogue process? Kill me?
2006:10:25-20:06:54: FORK ERROR - bad ?? Rogue process? Kill me?
2006:10:25-20:06:55: FORK ERROR - bad ?? Rogue process? Kill me?
2006:10:25-20:06:55: FORK ERROR - bad ?? Rogue process? Kill me?
2006:10:25-20:06:55: FORK ERROR - bad ?? Rogue process? Kill me?



main.log
Quote
2006-10-25 19:47:08 1GcoiS-0004av-7P daemon: delivery process fork failed: Cannot allocate memory
2006-10-25 21:53:09 fork of delivery process from queue runner 30536 failed
2006-10-25 20:08:10 daemon: fork of queue-runner process failed: Cannot allocate memory

panic.log
Quote
2006-10-25 21:38:10 fork of delivery process from queue runner 29855 failed
2006-10-25 19:45:36 1Gcogu-000413-Jv daemon: delivery process fork failed: Cannot allocate memory
2006-10-25 19:47:08 1GcoiS-0004av-7P daemon: delivery process fork failed: Cannot allocate memory
2006-10-25 21:53:09 fork of delivery process from queue runner 30536 failed
2006-10-25 20:08:10 daemon: fork of queue-runner process failed: Cannot allocate memory

Apache error.log
Quote
[Wed Oct 25 10:27:34 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
FATAL:  erealloc():  Unable to allocate 245760 bytes
[Wed Oct 25 10:27:44 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Wed Oct 25 10:27:54 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Wed Oct 25 10:28:04 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Wed Oct 25 10:28:14 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Wed Oct 25 10:28:24 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Wed Oct 25 10:28:34 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Wed Oct 25 10:28:44 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Wed Oct 25 10:28:54 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Wed Oct 25 10:29:04 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
FATAL:  emalloc():  Unable to allocate 45 bytes
FATAL:  emalloc():  Unable to allocate 5 bytes
[Wed Oct 25 21:35:40 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Wed Oct 25 21:35:50 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
FATAL:  emalloc():  Unable to allocate 130 bytes
FATAL:  emalloc():  Unable to allocate 130 bytes

Offline staff

  • Tech. EdelweissHosting
  • Administrator
  • Hero Member
  • *****
  • Posts: 6048
  • Karma: 50
    • View Profile
    • EdelweissHosting
Re : Erreurs Apache et System
« Reply #5 on: Octobre 25, 2006, 09:54:47 pm »
Bonsoir

Ce sont tous les processus qui à un moment donné ont du être tués parce que la RAM de votre machine était épuisée. Votre machine qui tourner des milliers de processus mais de temps en temps, elle épuise sa RAM et les nouveaux processus ne passent plus.

Vous avez un utilisateur qui fait tourner Awstats comme un malade:

[2006-10-21 20:33:13]: info: (target/actual) uid: (gregory/gregory) gid: (gregory/gregory) cmd: awstats.pl
[2006-10-21 20:33:15]: info: (target/actual) uid: (gregory/gregory) gid: (gregory/gregory) cmd: awstats.pl
[2006-10-21 20:33:17]: info: (target/actual) uid: (gregory/gregory) gid: (gregory/gregory) cmd: awstats.pl
[2006-10-21 20:33:21]: info: (target/actual) uid: (gregory/gregory) gid: (gregory/gregory) cmd: awstats.pl

Toutes les quelques secondes, il lance un script Awstats.

Il faut lui bloquer ça, autrement, même 1 Gb de RAM il vous le bouffe comme de rien.

On vous a augmenté la RAM le temps que vous solviez le problème.

Membre Staff EdelweissHosting
Site Principal: http://edelweisshosting.com
Votre IP: http://edelweisshosting.com/ip.php

Offline Spinacle

  • Revendeurs
  • Hero Member
  • ******
  • Posts: 993
  • Karma: 28
    • View Profile
    • Aubergedunet
Re : Erreurs Apache et System
« Reply #6 on: Octobre 26, 2006, 09:06:43 pm »
Staff,

Merci, je prends contact avec mon client.

Cela étant, de quoi cela vient, du fait qu'il navigue sur la page awstats ?
Je ne vois pas comment il peux créer des requêtes toutes les secondes.
Je ne peux décemment pas lui dire de ne plus consulter awstats.
« Last Edit: Octobre 26, 2006, 09:11:12 pm by Spinacle »

Offline Spinacle

  • Revendeurs
  • Hero Member
  • ******
  • Posts: 993
  • Karma: 28
    • View Profile
    • Aubergedunet
Re : Erreurs Apache et System
« Reply #7 on: Octobre 26, 2006, 09:20:32 pm »
Staff, j'ai quand l'impression d'avoir un soucis,
Je viens de faire un test, j'ai regardé ma conso ram, j'avais 70Mb de libre sur les 400.
Je suis un peu étonné car j'avais 3 ips différentes de connectés sur des sites (vérifié avec apache status), comment je peux avoir autant de ram consommé avec seulement 3 visiteurs ?

J'ai ensuite, lancé awstats sur mon site et effectivement, ma ram libre est tombé à 10Mb.
Elle est revenu après quelques secondes aux alentours de 60Mb.

Qu'est ce qui peux consommer autant de ram sur ma mémoire totale sans qu'awstats soit lancé ?

Merci

Offline staff

  • Tech. EdelweissHosting
  • Administrator
  • Hero Member
  • *****
  • Posts: 6048
  • Karma: 50
    • View Profile
    • EdelweissHosting
Re : Erreurs Apache et System
« Reply #8 on: Octobre 26, 2006, 09:35:10 pm »
Bonsoir

Il faut voir les crons de ce client. Awstats est programmé pour mettre à jour les stats toutes les 24 heures. Maintenant, ce client a un cron personnel pour mettre à jour les stats toutes les 3 ou 4 secondes. Forcément ça ralentit votre machine. Avant même que le premier cron soit fini, le prochain est lancé et ça vous fait des tas de processus qui se bousculent.

Merci
Membre Staff EdelweissHosting
Site Principal: http://edelweisshosting.com
Votre IP: http://edelweisshosting.com/ip.php

Offline Spinacle

  • Revendeurs
  • Hero Member
  • ******
  • Posts: 993
  • Karma: 28
    • View Profile
    • Aubergedunet
Re : Erreurs Apache et System
« Reply #9 on: Octobre 26, 2006, 09:38:18 pm »
Merci, je m'en vais faire un point avec lui. ;)

Ceci dit, c'est bizarre, le cron jobs est désactivé sur son compte...
« Last Edit: Octobre 26, 2006, 09:40:28 pm by Spinacle »

Offline staff

  • Tech. EdelweissHosting
  • Administrator
  • Hero Member
  • *****
  • Posts: 6048
  • Karma: 50
    • View Profile
    • EdelweissHosting
Re : Erreurs Apache et System
« Reply #10 on: Octobre 26, 2006, 10:03:27 pm »
Envoyez un email avec les codes d'accès de votre machine et je vais voir.
Membre Staff EdelweissHosting
Site Principal: http://edelweisshosting.com
Votre IP: http://edelweisshosting.com/ip.php

Offline Spinacle

  • Revendeurs
  • Hero Member
  • ******
  • Posts: 993
  • Karma: 28
    • View Profile
    • Aubergedunet
Re : Erreurs Apache et System
« Reply #11 on: Octobre 26, 2006, 10:08:00 pm »
Mail envoyé

Merci

Offline staff

  • Tech. EdelweissHosting
  • Administrator
  • Hero Member
  • *****
  • Posts: 6048
  • Karma: 50
    • View Profile
    • EdelweissHosting
Re : Erreurs Apache et System
« Reply #12 on: Octobre 26, 2006, 10:40:32 pm »
C'est bien reçu. On va l'observer pour voir. En tout cas, tout est réglo dessus.
Membre Staff EdelweissHosting
Site Principal: http://edelweisshosting.com
Votre IP: http://edelweisshosting.com/ip.php

Offline Spinacle

  • Revendeurs
  • Hero Member
  • ******
  • Posts: 993
  • Karma: 28
    • View Profile
    • Aubergedunet
Re : Erreurs Apache et System
« Reply #13 on: Octobre 26, 2006, 10:43:03 pm »
Merci Staff

Offline Spinacle

  • Revendeurs
  • Hero Member
  • ******
  • Posts: 993
  • Karma: 28
    • View Profile
    • Aubergedunet
Re : Erreurs Apache et System
« Reply #14 on: Octobre 27, 2006, 07:50:21 pm »
Staff,

Avez-vous détecter des choses d'anormales, car j'ai encore des erreurs dans les logs pourtant, il n'y a pas eu de requêe sur Awstats à cette heure :

Code: [Select]
[Fri Oct 27 03:49:17 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Oct 27 03:49:27 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Oct 27 03:49:37 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Oct 27 03:49:47 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Oct 27 03:49:57 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Oct 27 03:50:07 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Oct 27 03:50:17 2006] [error] (12)Cannot allocate memory: fork: Unable to fork new process