| Author |  | 
| gtsongi 
 
 
 Joined: 06 Aug 2015
 Posts: 3
 
 
 | 
|  Posted: Fri 07 Aug '15 11:04    Post subject: Apache process size is ~300MB |   |  
| 
 |  
| Hello, 
 I was preparing to optimize my Apache configuration. While I was reading around I saw people mentioning Apache process sizes between 10 and 40 MB. When I've checked mine on the server I saw that they are at 300. Basically every running Apache process. What can cause this? Server and Apache specs are:
 Server:
 CPU: Intel(R) Xeon(R) CPU E5-2609 0 @ 2.40GHz, 2 cores
 Real Memory: 8GB
 Virtual Memory 2GB
 OS: Ubuntu 14
 
 Apache:
 Version: 2.4.7
 
 Enabled Apache modules:
 access_compat
 alias
 auth_basic
 auth_core
 authn_file
 authz_core
 authz_host
 authz_user
 autoindex
 cgi
 deflate
 dir
 env
 filter
 mime
 mpm_prefork
 negotiation
 php5
 reqtimeout
 rewrite
 setenvif
 socache_shmcb
 ssl
 status
 
 Apache settings:
 Timeout 300
 KeepAlive On
 MaxKeepAliveRequests 100
 KeepAliveTimeout 5
 StartServers 5
 MinSpareServers 5
 MaxSpareServers 10
 MaxClients 150
 MaxRequestsPerChild 0
 
 Can any of these settings or modules cause the process size to increase so much?
 |  | 
| Back to top |  | 
| James Blond Moderator
 
  
 Joined: 19 Jan 2006
 Posts: 7442
 Location: EU, Germany, Next to Hamburg
 
 |  | 
| Back to top |  | 
| gtsongi 
 
 
 Joined: 06 Aug 2015
 Posts: 3
 
 
 | 
|  Posted: Fri 07 Aug '15 11:22    Post subject: |   |  
| 
 |  
| Thanks for the quick reply! I've tried to run check_httpd_limits, but it only gives me warning about a few missing config variables before exiting with the error: ERROR: Cannot determine httpd version number.
 |  | 
| Back to top |  | 
| James Blond Moderator
 
  
 Joined: 19 Jan 2006
 Posts: 7442
 Location: EU, Germany, Next to Hamburg
 
 | 
|  Posted: Fri 07 Aug '15 11:51    Post subject: |   |  
| 
 |  
| Argh! That is the ubuntu way of things to have the env vars in a different file that is only for the apache2ctl script. 
 what will work
 
 
  	  | Code: |  	  | sudo su
 source /etc/apache2/envvars
 ./check_httpd_limits.pl --verbose
 
 | 
 |  | 
| Back to top |  | 
| gtsongi 
 
 
 Joined: 06 Aug 2015
 Posts: 3
 
 
 | 
|  Posted: Fri 07 Aug '15 12:20    Post subject: |   |  
| 
 |  
| Thank you! This worked perfectly. I'm just a bit confused by the numbers it is displaying. For example: PID 21852 (apache2)   :   25.49 MB /   5.58 MB shared
 In Webmin the same process shows 378MB. Which one is the correct number?
 |  | 
| Back to top |  | 
| James Blond Moderator
 
  
 Joined: 19 Jan 2006
 Posts: 7442
 Location: EU, Germany, Next to Hamburg
 
 | 
|  Posted: Fri 07 Aug '15 15:51    Post subject: |   |  
| 
 |  
| I think that check_httpd_limits.pl shows the true usage. 
 the quickest way to check what is true.
 
 
 
 stop apache
 
 run free -th again. And see it for yourself how much memory apache consumes. ( Of cause don't forget to start apache again ;) )
 |  | 
| Back to top |  |