2

Following https://serverfault.com/questions/418735/unbelievable-issue-a-single-apache-process-takes-4-gb-of-memory I post as a new question because I was able to identify the fact that it happens when the client connecting is Googlebot.

By "it", I mean that one single apache process eats 5 Gigabyte of memory ?!

Does anyone has an idea about what could be the cause of this ?

Thanks a lot for any help !

I found another question with exact same problem but no answer : https://serverfault.com/questions/161478/apache-process-consuming-all-memory-on-the-server

Our environment uses PHP and postgresql :

# httpd -V
Server version: Apache/2.2.3
Server built:   Jun  6 2012 10:00:42
Server's Module Magic Number: 20051115:3
Server loaded:  APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture:   64-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="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
db_ch
  • 638
  • 5
  • 14
  • 20
  • 1
    I think you should give us more information on your complete environment, especially your Apache configuration. What kind of webpage does the googlebot call? Is it a PHP, Ruby, Java, ... I think you get what I mean. – Fleshgrinder Aug 18 '12 at 00:33
  • Fleshgrinder, I added some details about our webserver. About the pages Googlebots is fetching, it has no relation to the problem, the problem comes with any page, and PHP is limited to 32M, so I think Apache is the one using 5000M ? But why ? – db_ch Aug 18 '12 at 08:14
  • Activate debug logging and evaluate the log file. That's the only thing you can do to find out what is causing this effect. It's impossible to give a general purpose answer to this question without knowing the environment. – Fleshgrinder Aug 18 '12 at 09:56
  • I have the exact same issue, but putting the log level to debug reveals nothing. I suppose that is because the requests that cause the problem never return and are thus not logged. Did you ever find a solution? – Mopper Nov 12 '12 at 09:38
  • Dear Mopper, finally we found a solution, yes, but not by looking in the logs ! It was completely impossible to understand the cause of the problem by any possible solution. Even with core dumps or straces, no rational analysis succeeded ! Until now, even with the problem solved I still cannot understand where the problem really came from and/or how to understand of analyze it. Therefore it's really difficult to give you any warranty that our solution was really the solution ! As far as I know the solution seems to be MaxRequestsPerChild – db_ch Nov 12 '12 at 13:21
  • http://serverfault.com/questions/288848/apache-crashing-with-memory-cpu-overload-when-google-crawler-visits-site – db_ch Nov 12 '12 at 13:22
  • possible duplicate of [Unbelievable issue : a single apache process takes 4 GB of memory](http://serverfault.com/questions/418735/unbelievable-issue-a-single-apache-process-takes-4-gb-of-memory) – kasperd Nov 02 '14 at 17:48

1 Answers1

1

Finally we found a solution, but not by looking in the logs !

It was completely impossible to understand the cause of the problem by any possible solution. Even with core dumps or straces, no rational analysis succeeded !

Until now, even with the problem solved I still cannot understand where the problem really came from and/or how to understand of analyze it. Therefore it's really difficult to give you any warranty that our solution was really the solution !

As far as I know the solution seems to be MaxRequestsPerChild : ServerFault post about MaxRequestsPerChild

db_ch
  • 638
  • 5
  • 14
  • 20
  • It can also be KeepAlive, KeepAliveTimeout, MaxKeepAliveRequests – db_ch Nov 12 '12 at 13:56
  • What values did you set for these parameters? I'm having the exact same issue as you, but also haven't been able to find the cause! – Mopper Nov 14 '12 at 16:34