Apache Crashing every few days on Linode 512

message

Mar 24 12:31:36 li279-200 kernel: Out of memory: kill process 26468 (httpd) score 58140 or a child
Mar 24 12:31:36 li279-200 kernel: Killed process 26468 (httpd)
Mar 24 12:31:59 li279-200 kernel: mysqld invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0

HTTPD logs

[Wed Mar 23 11:41:21 2011] [notice] caught SIGTERM, shutting down
[Wed Mar 23 11:41:32 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Mar 23 11:41:32 2011] [notice] Digest: generating secret for digest authentication ...
[Wed Mar 23 11:41:32 2011] [notice] Digest: done
[Wed Mar 23 11:41:33 2011] [notice] Apache/2.2.17 (Unix) DAV/2 PHP/5.3.5 configured -- resuming normal operations

MySQL Config

key_buffer = 16M 
max_allowed_packet = 64M 
thread_stack = 192K 
thread_cache_size = 4
max_connections = 50 
table_cache = 1000 
table_definition_cache = 1000 
thread_concurrency = 12 
query_cache_limit = 1M 
query_cache_size = 12M

httpd conf (Just changed this)

 <ifmodule prefork.c="">StartServers       5
MinSpareServers    5
MaxSpareServers    5
ServerLimit      256
MaxClients       25
MaxRequestsPerChild  1000</ifmodule> 
KeepAliveTimeout 2

2 Replies

additional info: my site is running xenforo (similar to vBulletin) with approximately 1000 visitors in a 24 hour period. I know the general reply will be to switch from Apache to something different - Right now I can't do this (plus the 512 + apache should be able to handle traffic to this site).

Also , I have APC cache enabled.

MORE INFO:

 free -k
             total       used       free     shared    buffers     cached
Mem:        510652     490032      20620          0       8592     360092
-/+ buffers/cache:     121348     389304
Swap:       262136       9108     253028

Try dropping apache's MaxClients a bit, forums tend to be heavy on ram usage, so for example if you have 25 php processes using 32MB ram that's 800mb of ram, more than you have, set it to 10 and see if that helps.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct